View Source gc_discover behaviour (gen_cluster v0.3.0)

Behaviour to implement to build a method for discovery nodes to connect to.

Summary

Types

The state of the callback.

Callbacks

Called only when a gen_cluster first starts or restarts.

Returns the peer nodes for gen_cluster to call connect on.

Types

-type cb_state() :: term().

The state of the callback.

Callbacks

-callback init(term()) -> {ok, cb_state()}.

Called only when a gen_cluster first starts or restarts.

-callback peers(cb_state()) -> gen_cluster:peers().

Returns the peer nodes for gen_cluster to call connect on.