Managoat.Runner.Host.Local (managoat_runner v0.1.0)

Copy Markdown View Source

The reference Managoat.Runner.Host: a plain Registry (keys: :unique) on one node, and no reaction to heartbeats or presence.

Start it under a supervisor and name it in config:

children = [Managoat.Runner.Host.Local]
config :managoat_runner, host: Managoat.Runner.Host.Local

A registration is tied to the connection process: when that process exits the Registry drops it, which is the same guarantee a clustered host gives. The library's tests run against this host; a platform that runs more than one node, keeps a row per runner or broadcasts presence implements the behaviour over its own registry instead.

Summary

Functions

A child spec for the registry, so the host can sit in a supervision tree.

The Registry name this host registers connections in.

Start the registry, linked to the caller.

Functions

child_spec(opts \\ [])

@spec child_spec(term()) :: Supervisor.child_spec()

A child spec for the registry, so the host can sit in a supervision tree.

registry()

@spec registry() :: atom()

The Registry name this host registers connections in.

start_link(opts \\ [])

@spec start_link(term()) :: {:ok, pid()} | {:error, term()}

Start the registry, linked to the caller.