mcl_core_describe (mcl_core v1.0.0)
View SourceBacks the synthetic <service-name>.describe_capabilities mesh capability mcl_core:boot/2 advertises for any service exporting describe_rpc_capabilities/0 and/or describe_pubsub_capabilities/0 (see mcl_core_service's own moduledoc for both callbacks).
Deliberately stateless: describe/1 (the handler mcl_core_simple_handler dispatches to) reads the current service module from mcl_core:service_module/0 -- the SAME persistent_termboot/2 already populates for every other mcl_core internal that needs to know "which service am I" -- so this needs no gen_server of its own, matching mcl_core_simple_handler`s own "no per-request state" ethos.
Summary
Functions
The synthetic <ServiceName>.describe_capabilities capability map for ServiceMod, or undefined when it exports neither describe_rpc_capabilities/0 nor describe_pubsub_capabilities/0 -- nothing to advertise, so nothing is. auth => open is stated, not defaulted: macula 18 refuses an advertise that names no policy (macula#147), and open is the decision here because pure metadata about what a service exposes is not sensitive, matching this codebase's own precedent for other discovery-shaped capabilities (an LLM service's list_available / check_health).
mcl_core_simple_handler's dispatch target: Payload is ignored (this capability takes no meaningful arguments), the reply is always the current service's full description.
The handler capability_for/2 registers: it describes the service it was registered for, so each service on a node hosting several answers for itself (mcl-om#8).
Functions
-spec capability_for(module(), binary()) -> mcl_core_service:capability() | undefined.
The synthetic <ServiceName>.describe_capabilities capability map for ServiceMod, or undefined when it exports neither describe_rpc_capabilities/0 nor describe_pubsub_capabilities/0 -- nothing to advertise, so nothing is. auth => open is stated, not defaulted: macula 18 refuses an advertise that names no policy (macula#147), and open is the decision here because pure metadata about what a service exposes is not sensitive, matching this codebase's own precedent for other discovery-shaped capabilities (an LLM service's list_available / check_health).
mcl_core_simple_handler's dispatch target: Payload is ignored (this capability takes no meaningful arguments), the reply is always the current service's full description.
The handler capability_for/2 registers: it describes the service it was registered for, so each service on a node hosting several answers for itself (mcl-om#8).