hecate_om_capabilities (hecate_om v0.3.1)
View SourcePublishes a service's capability list onto the realm's capability-announce channel AND subscribes to that channel to track every other service's announcements.
Two roles in one worker:
- Publisher: every register/1 or publish/0 call republishes this service's capability summary onto <<"_mesh.cap.announce">>. - Subscriber: at boot (and on every reconfigure), subscribes to the same topic; inbound summaries land in handle_info/2 and update the peer_caps map.
Other services / plugins call lookup/1 with a capability name (<<"hecate-rag.answer_query">>) and get back the list of services that advertised it. Caller uses that list to pick a target for macula:call/5.
Summary
Functions
Find services that advertised the given capability name. Returns {ok, [#{service := Bin, capabilities := [...], published_at := Ms}]}.
Functions
Find services that advertised the given capability name. Returns {ok, [#{service := Bin, capabilities := [...], published_at := Ms}]}.
-spec peers() -> [map()].