Module econfd_ha
An Erlang interface equivalent to the HA C-API (documented in confd_lib_ha(3)).Version: 6.5.4
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 | (Deprecated.) Instruct a HA node to be primary in the cluster. |
benone/1 | Instruct a HA node to be nothing in the cluster. |
beprimary/2 | Instruct a HA node to be primary in the cluster. |
berelay/1 | Instruct a HA secondary to be a relay for other secondaries. |
besecondary/4 | Instruct a HA node to be secondary in the cluster where PrimaryNodeId is primary. |
beslave/4 | (Deprecated.) Instruct a HA node to be secondary in the cluster where PrimaryNodeId is primary. |
close/1 | Close the HA connection. |
connect/2 | |
connect/3 | |
getstatus/1 | Request status from a HA node. |
secondary_dead/2 | Instruct ConfD that another node is dead. |
slave_dead/2 | (Deprecated.) 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()}
This function is deprecated: Please use beprimary/2 instead
Instruct a HA node to be primary in the cluster.
benone/1
Instruct a HA node to be nothing in the cluster.
beprimary/2
beprimary(Socket, NodeId) -> Result
Socket = econfd:socket()
NodeId = econfd:value()
Result = ok | {error, econfd:error_reason()}
Instruct a HA node to be primary in the cluster.
berelay/1
Instruct a HA secondary to be a relay for other secondaries.
besecondary/4
besecondary(Socket, NodeId, PrimaryNodeId, WaitReplyBool) -> Result
Socket = econfd:socket()
NodeId = econfd:value()
PrimaryNodeId = ha_node()
WaitReplyBool = integer()
Result = ok | {error, econfd:error_reason()}
Instruct a HA node to be secondary in the cluster where PrimaryNodeId is primary.
beslave/4
beslave(Socket, NodeId, PrimaryNodeId, WaitReplyBool) -> Result
Socket = econfd:socket()
NodeId = econfd:value()
PrimaryNodeId = ha_node()
WaitReplyBool = integer()
Result = ok | {error, econfd:error_reason()}
This function is deprecated: please use besecondary/2 instead
Instruct a HA node to be secondary in the cluster where PrimaryNodeId is primary.
close/1
Close the HA connection.
connect/2
connect(Path, Token) -> econfd:connect_result()
Path = string()
Token = binary()
connect(Address, Token) -> econfd:connect_result()
Address = econfd:ip()
Token = binary()
connect/3
connect(Address, Port, Token) -> any()
getstatus/1
Request status from a HA node.
secondary_dead/2
secondary_dead(Socket, NodeId) -> Result
Socket = econfd:socket()
NodeId = econfd:value()
Result = ok | {error, econfd:error_reason()}
Instruct ConfD that another node is dead.
slave_dead/2
slave_dead(Socket, NodeId) -> Result
Socket = econfd:socket()
NodeId = econfd:value()
Result = ok | {error, econfd:error_reason()}
This function is deprecated: Please use secondary_dead/2 instead
Instruct ConfD that another node is dead.
Generated by EDoc