Plasma GitLab Archive
Projects Blog Knowledge

Plasma Project:
Home 
Manual 
FAQ 
Slides 
Perf 
Releases 

Module Nn_elect

module Nn_elect: sig .. end
Election of the coordinator

type role = [ `Coordinator | `Excluded | `Slave | `Unknown ] 
val string_of_role : role -> string
val get_role : unit -> role
Return the role. This is `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
Return the coordinator in "host:port" syntax. This is only known if the role is `Coordinator or `Slave.

Can be called from any Netplex container process.

val elect_e : Nn_config.nn_node_config ->
int ->
Pfs_auth.client_auth ->
Unixqueue.event_system -> (int option * string) Uq_engines.engine
Do the election. The int arg is the port number of this server.

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
Set up the RPC server so that Elect procedures are bound
val stop_election : unit -> unit
Stops any ongoing election (in the current process only)
val stop_election_msg : string
The name of a parameterless message for stop_election. This message is sent around to call stop_election in every manager process.
This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml