View Source gc_discover_static (gen_cluster v0.3.0)

Discovery method that takes a list of hosts to connect to and to reconnect to if a connect is lost. Reconnection can be disabled by including the option refresh_interval_ms => infinity when starting gen_cluster.

This is a built-in discover implementation so has a short name, static, as well.

Summary

Types

The options for starting this discover module, a list of node names

Types

-type options() :: [node()].

The options for starting this discover module, a list of node names

Functions

-spec init(options()) -> {ok, #state{peers :: gen_cluster:peers()}}.
-spec peers(#state{peers :: gen_cluster:peers()}) -> gen_cluster:peers().