hecate_om (hecate_om v0.12.0)
View SourcePublic 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.
Call a capability by name over the direct-dial data path: resolve a provider from the DHT, dial its serving station directly, and issue the CALL there (failing over to the next provider on error). The CALL uses CapName as the procedure, realm-scoped.
Snapshot of this service's health. Used by /health handler.
Functions
-spec advertise_capabilities() -> ok.
(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.
Typical call from the hosting service's _app:start/2:
start(_, _) -> hecate_om:boot(my_service).
-spec call_capability(binary(), term(), pos_integer()) -> {ok, term()} | {error, term()}.
Call a capability by name over the direct-dial data path: resolve a provider from the DHT, dial its serving station directly, and issue the CALL there (failing over to the next provider on error). The CALL uses CapName as the procedure, realm-scoped.
-spec health() -> hecate_om_service:health().
Snapshot of this service's health. Used by /health handler.
-spec service_module() -> module() | undefined.