hecate_om (hecate_om v0.3.1)

View Source

Public facade for hecate-om.

Services typically only need a handful of these:

hecate_om:boot(MyServiceMod) %% one-call lifecycle wiring hecate_om:advertise_capabilities() %% (re-)publish my caps hecate_om:health() %% snapshot for /health hecate_om:service_cert() %% load my service-principal cert hecate_om:macula_client() %% returns the SDK client handle

Summary

Functions

(Re-)publish this service's capabilities onto the mesh. Typically called once at boot; call again when the capability set changes.

Wire a service module into hecate_om and start it.

Snapshot of this service's health. Used by /health handler.

Functions

boot(ServiceMod)

-spec boot(module()) -> {ok, pid()} | {error, term()}.

Wire a service module into hecate_om and start it.

Typical call from the hosting service's _app:start/2:

start(_, _) -> hecate_om:boot(my_service).

boot(ServiceMod, Opts)

-spec boot(module(), map()) -> {ok, pid()} | {error, term()}.

health()

-spec health() -> hecate_om_service:health().

Snapshot of this service's health. Used by /health handler.

macula_client()

-spec macula_client() -> {ok, term()} | {error, term()}.

service_cert()

-spec service_cert() -> {ok, binary()} | {error, term()}.

service_module()

-spec service_module() -> module() | undefined.