SwimEx.Supervisor (SwimEx v0.1.0)

View Source

Top-level supervisor for a SwimEx cluster node.

Add to your supervision tree:

children = [
  {SwimEx.Supervisor,
   host: "10.0.0.1",
   port: 7771,
   seeds: [{"10.0.0.2", 7771}]}
]
Supervisor.start_link(children, strategy: :one_for_one)

Options:

  • :host — (required) this node's hostname or IP string
  • :port — (required) UDP port to bind
  • :cookie — optional string cookie, default ""
  • :name — SWIM instance name atom, default :swim
  • :seeds — list of {host, port} seed nodes, default []
  • :protocol_period — ms, default 1000
  • :ping_timeout — ms, default 200
  • :ping_req_fanout — integer, default 3
  • :suspicion_timeout — ms, default 3000
  • :seed_retry_interval — ms, default 5000
  • :dead_node_expiry — ms, default 6000

Summary

Functions

Returns a specification to start this module under a supervisor.

Starts the SwimEx supervisor.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts)

@spec start_link(keyword()) :: Supervisor.on_start()

Starts the SwimEx supervisor.