View Source cets_discovery_file (cets v0.2.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).

Link to this section Summary

Types

Start options.
The backend state.

Functions

Get a list of nodes.
Init backend.

Link to this section Types

-type opts() :: #{disco_file := file:filename()}.
Start options.
-type state() :: opts().
The backend state.

Link to this section Functions

-spec get_nodes(state()) -> {cets_discovery:get_nodes_result(), state()}.
Get a list of nodes.
-spec init(opts()) -> state().
Init backend.