dynamic_server_manager v0.0.3 DynamicServerManager.Server behaviour

Link to this section Summary

Link to this section Types

Link to this type config()
config() :: Map.t()
Link to this type info()
info() ::
  %{public_ip_v4: ip()} | %{public_ip_v4: ip(), external_ip_v4: ip()}
Link to this type location()
location() :: atom()
Link to this type metadata()
metadata() :: Map.t()
Link to this type minutes_old()
minutes_old() :: non_neg_integer() | nil
Link to this type overrides()
overrides() :: Map.t()
Link to this type server()
server() :: atom()
Link to this type server_id()
server_id() :: String.t()
Link to this type server_list()
server_list() :: [] | [server_id(), ...]
Link to this type specs()
specs() :: Map.t()
Link to this type status()
status() :: [
  :inactive | :starting | :running | :destroying | :destroyed | :migrating
]

Link to this section Functions

Link to this function build_config(key, location, server, overrides \\ %{})
Link to this function filter_servers_minutes_old(servers, minutes_old)
Link to this function get_location(key, location)
Link to this function get_module(provider)
Link to this function make_hostname(prefix \\ "server")
Link to this function parse_datestring(string, format \\ "{ISO:Extended:Z}")

Link to this section Callbacks

Link to this callback config(location, server, overrides)
config(location(), server(), overrides()) :: config()
Link to this callback create_from_snapshot(specs)
create_from_snapshot(specs()) :: {:ok, metadata()} | {:error, String.t()}
Link to this callback destroy(metadata)
destroy(metadata()) :: :ok | {:error, String.t()}
Link to this callback info(metadata)
info(metadata()) :: {:ok, info()} | {:error, String.t()}
Link to this callback list_servers(location, minutes_old)
list_servers(location(), minutes_old()) :: server_list()
Link to this callback status(metadata)
status(metadata()) :: status() | {:error, String.t()}
Link to this callback up(location)
up(location()) :: boolean()