Module econfd_ha

An Erlang interface equivalent to the HA C-API (documented in confd_lib_ha(3)).

Version: 5.7.19

Description

An Erlang interface equivalent to the HA C-API (documented in confd_lib_ha(3)).

Data Types

ha_node()

ha_node() = #ha_node{}

Function Index

bemaster/2Instruct a HA node to be master in the cluster.
benone/1Instruct a HA node to be nothing in the cluster.
berelay/1Instruct a HA slave to be a relay for other slaves.
beslave/4Instruct a HA node to be slave in the cluster where MasterNodeId is master.
close/1Close the HA connection.
connect/2Equivalent to connect(Address, 4565, Mask).
connect/3Connect to the HA subsystem on host with address Address:Port.
getstatus/1Request status from a HA node.
slave_dead/2Instruct ConfD that another node is dead.

Function Details

bemaster/2

bemaster(Socket, NodeId) -> Result

Instruct a HA node to be master in the cluster.

benone/1

benone(Socket) -> Result

Instruct a HA node to be nothing in the cluster.

berelay/1

berelay(Socket) -> Result

Instruct a HA slave to be a relay for other slaves.

beslave/4

beslave(Socket, NodeId, MasterNodeId, WaitReplyBool) -> Result

Instruct a HA node to be slave in the cluster where MasterNodeId is master.

close/1

close(Socket) -> Result

Close the HA connection.

connect/2

connect(Address, Token) -> econfd:connect_result()

Equivalent to connect(Address, 4565, Mask).

connect/3

connect(Address, Port, Token) -> econfd:connect_result()

  • Address = econfd:ip()
  • Port = non_neg_integer()
  • Token = binary()

Connect to the HA subsystem on host with address Address:Port.

If the port is changed it must also be changed in confd.conf To close a HA socket, use close/1.

getstatus/1

getstatus(Socket) -> Result

Request status from a HA node.

slave_dead/2

slave_dead(Socket, NodeId) -> Result

Instruct ConfD that another node is dead.


Generated by EDoc