View Source cets_discovery_file (cets v0.3.0)

File backend for cets_discovery.

Barebone AWS EC2 auto-discovery is limited:

- UDP broadcasts do not work.

- AWS CLI needs access.

- DNS does not allow to list subdomains.

So, we use a file with nodes to connect as a discovery mechanism (so, you can hardcode nodes or use your method of filling it).

Summary

Types

Start options.

The backend state.

Functions

Get a list of nodes.

Init backend.

Types

-type opts() :: #{disco_file := file:filename()}.

Start options.

-type state() :: opts().

The backend state.

Functions

-spec get_nodes(state()) -> {cets_discovery:get_nodes_result(), state()}.

Get a list of nodes.

-spec init(opts()) -> state().

Init backend.