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/2 | Instruct a HA node to be master in the cluster. |
benone/1 | Instruct a HA node to be nothing in the cluster. |
berelay/1 | Instruct a HA slave to be a relay for other slaves. |
beslave/4 | Instruct a HA node to be slave in the cluster where MasterNodeId is master. |
close/1 | Close the HA connection. |
connect/2 | Equivalent to connect(Address, 4565, Mask). |
connect/3 | Connect to the HA subsystem on host with address Address:Port. |
getstatus/1 | Request status from a HA node. |
slave_dead/2 | Instruct ConfD that another node is dead. |
Function Details
bemaster/2
bemaster(Socket, NodeId) -> Result
- Socket = econfd:socket()
- NodeId = econfd:value()
- Result = ok | {error, econfd:error_reason()}
Instruct a HA node to be master in the cluster.
benone/1
benone(Socket) -> Result
- Socket = econfd:socket()
- Result = ok | {error, econfd:error_reason()}
Instruct a HA node to be nothing in the cluster.
berelay/1
berelay(Socket) -> Result
- Socket = econfd:socket()
- Result = ok | {error, econfd:error_reason()}
Instruct a HA slave to be a relay for other slaves.
beslave/4
beslave(Socket, NodeId, MasterNodeId, WaitReplyBool) -> Result
- Socket = econfd:socket()
- NodeId = econfd:value()
- MasterNodeId = ha_node()
- WaitReplyBool = integer()
- Result = ok | {error, econfd:error_reason()}
Instruct a HA node to be slave in the cluster where MasterNodeId is master.
close/1
close(Socket) -> Result
- Socket = econfd:socket()
- Result = ok | {error, econfd:error_reason()}
Close the HA connection.
connect/2
connect(Address, Token) -> econfd:connect_result()
- Address = econfd:ip()
- Token = binary()
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, useclose/1
.
getstatus/1
getstatus(Socket) -> Result
- Socket = econfd:socket()
- Result = ok | {error, econfd:error_reason()}
Request status from a HA node.
slave_dead/2
slave_dead(Socket, NodeId) -> Result
- Socket = econfd:socket()
- NodeId = econfd:value()
- Result = ok | {error, econfd:error_reason()}
Instruct ConfD that another node is dead.
Generated by EDoc