Meshx.ServiceMesh behaviour (Meshx v0.1.0) View Source
todo: Documentation will be provided at a later date.
Please check MeshxConsul for example service mesh adapter implementation.
Link to this section Summary
Link to this section Types
Specs
address() ::
{:tcp, ip :: :inet.ip_address(), port :: :inet.port_number()}
| {:uds, path :: String.t()}
Link to this section Callbacks
Specs
connect( upstreams :: [upstream :: atom() | String.t() | map()], template :: map(), proxy :: nil | {proxy_service_name :: String.t() | atom(), proxy_service_id :: String.t() | atom()} ) :: {:ok, []} | {:ok, [ok: addr :: address(), error: err :: term()]} | {:error, :invalid_state} | {:error, :service_not_owned} | term()
Specs
Specs
start(
params ::
(name :: atom() | String.t())
| {name :: atom() | String.t(), id :: atom() | String.t()}
| map()
| any(),
template ::
[
registration: map(),
ttl: nil | %{id: String.t()},
proxy: nil | [String.t()]
]
| any(),
force_registration? :: boolean(),
timeout :: non_neg_integer()
) ::
{:ok, service_id :: String.t(), addr :: address()}
| {:ok, :already_started}
| {:error, :invalid_state}
| {:error, :service_not_owned}
| {:error, :service_alive_timeout}
| term()