module Nn_elect:Election of the coordinatorsig
..end
typerole =
[ `Coordinator | `Excluded | `Slave | `Unknown ]
val get_role : unit -> role
`Unknown
if the election is not yet
finished, and `Coordinator
or `Slave
otherwise.
Can be called from any Netplex container process.
val get_coordinator : unit -> string
`Coordinator
or `Slave
.
Can be called from any Netplex container process.
val elect_e : Nn_config.nn_node_config ->
int -> Unixqueue.event_system -> (int option * string) Uq_engines.engine
Returns (index_opt, rev_ident)
:
index_opt
is the index of the coordinator in the nn_nodes
list
of the configuration object Nn_config.nn_node_config
, but only
if this machine is the coordinator. None
otherwise.
rev_ident
is the revision string.
val setup_elect_api : Rpc_server.t -> Nn_config.nn_node_config -> unit
Elect
procedures are bound