Documentation
¶
Overview ¶
Package runtime owns the plugin-lifecycle composition root for the daemon binary. Holds the coreapi.ServiceRegistry, constructs the daemon-side adapters that satisfy plugin Deps (Streams, EventBus, Identity, Polo), and registers/starts/stops L11 services.
Lives outside pkg/daemon (L7) so daemon stays free of pkg/coreapi (L10) imports — that's T7.1 in docs/architecture/04-EXTRACTION.md. Imports both pkg/daemon and pkg/coreapi (downward edges, allowed).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsDaemonPolicyManager ¶
func AsDaemonPolicyManager(pm coreapi.PolicyManager) daemon.PolicyManager
AsDaemonPolicyManager adapts a coreapi.PolicyManager (returned by plugins/policy.Service.Manager()) to daemon.PolicyManager. The two interfaces have identical method shapes; the adapter does the PolicyRunner element-type conversion on All() and Get().
Types ¶
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime owns the plugin-side glue for a single daemon. cmd/daemon constructs one, registers L11 services, then calls StartPlugins after Daemon.Start (so regConn etc. are wired) and StopPlugins before Daemon.Stop.
func (*Runtime) Register ¶
Register adds a service to the registry. Mirrors the old daemon.RegisterPlugin. Must be called before StartPlugins.
func (*Runtime) StartPlugins ¶
StartPlugins starts every registered service in Order order. Plugins receive a Deps bundle covering Streams, Identity, Events, Trust.