Versions in this module Expand all Collapse all v0 v0.2.0 Nov 22, 2026 v0.1.0 Sep 6, 2026 Changes in this version + const LiveFormatVersion + const MaximumStateSnapshotBytes + const ReconcileReceiptFormatVersion + var ErrCandidatePreMountUnsupported = errors.New("plugin reconciliation candidate cannot be pre-mounted") + var ErrExportUnavailable = errors.New("plugin realm export unavailable") + var ErrReconcileLeakDetected = errors.New("plugin reconciliation detected retained ownership") + var ErrReconcileNoChanges = errors.New("plugin reconciliation candidate has no changes") + var ErrReconcileStale = errors.New("plugin reconciliation candidate is stale") + var ErrStateMigrationNeeded = errors.New("plugin reconciliation requires explicit state migration") + var ErrUnknownExport = errors.New("unknown plugin realm export") + type CandidateContext struct + Config json.RawMessage + Descriptor plugin.Descriptor + EntryID string + Identity plugin.Identity + Lifecycle CandidateLifecycle + Permissions Permissions + Services Services + type CandidateLifecycle interface + Defer func(name string, dispose func(context.Context) error) error + type CandidateMount interface + Activate func(context.Context, MountContext) error + type CandidatePreMounter interface + PreMount func(context.Context, CandidateContext) (CandidateMount, error) + type CandidateStateMigrator interface + MigrateState func(context.Context, StateMigration) (json.RawMessage, error) + type Config struct + Implementations map[string]string + Permissions map[string][]plugin.Permission + Plan plugin.Plan + Registry *Registry + ShutdownTimeout time.Duration + Values map[string]json.RawMessage + type ConfigValidator interface + ValidateConfig func(json.RawMessage) error + type EntryLive struct + Desired bool + Effects int + Error string + Identity plugin.Identity + Implementation string + Runtime inspect.ArtifactIdentity + Services []plugin.Contract + State string + Workers int + type EntryRetirement struct + ClosedScopes int + Entry string + RemainingChildScopes int + RemainingEffects int + RemainingServices int + RemainingWorkers int + RetiredScopes int + type EntryStateTransfer struct + AfterStateDigest string + BeforeStateDigest string + Entry string + MigratorImplementation string + Schema plugin.Contract + type EntryTransition struct + AfterConfigDigest string + AfterImplementation string + AfterPermissions []plugin.Permission + AfterRuntime inspect.ArtifactIdentity + BeforeConfigDigest string + BeforeImplementation string + BeforePermissions []plugin.Permission + BeforeRuntime inspect.ArtifactIdentity + Entry string + type EntryUpdate struct + Config json.RawMessage + Entry string + Implementation string + Permissions []plugin.Permission + SetConfig bool + SetImplementation bool + SetPermissions bool + type ExportLive struct + Available bool + Contract plugin.Contract + Provider string + Revision uint64 + type Factory interface + Descriptor func() plugin.Descriptor + Mount func(context.Context, MountContext) error + type Lifecycle interface + Defer func(name string, dispose func(context.Context) error) error + Do func(name string, work func(context.Context) error) error + Go func(name string, worker func(context.Context) error) error + type Live struct + Entries map[string]EntryLive + Exports map[string]ExportLive + Fingerprint string + FormatVersion uint64 + ObservedAt time.Time + Realm plugin.Realm + Sequence uint64 + State string + type MountContext struct + Config json.RawMessage + Descriptor plugin.Descriptor + EntryID string + Identity plugin.Identity + Lifecycle Lifecycle + Permissions Permissions + Publisher Publisher + Services Services + State StateLifecycle + type Mounted struct + func Mount(ctx context.Context, config Config) (*Mounted, error) + func (mounted *Mounted) Activate(ctx context.Context, entryID string) error + func (mounted *Mounted) Close(ctx context.Context) error + func (mounted *Mounted) Export(name string) (value any, contract plugin.Contract, provider string, revision uint64, ...) + func (mounted *Mounted) Live() Live + func (mounted *Mounted) Plan() plugin.Plan + func (mounted *Mounted) Reconcile(ctx context.Context, candidate ReconcileCandidate) (ReconcileReceipt, error) + func (mounted *Mounted) Replace(ctx context.Context, entryID, implementation string) error + func (mounted *Mounted) Unmount(ctx context.Context, entryID string) error + type Permissions interface + Allows func(kind, resource, operation string) bool + Snapshot func() []plugin.Permission + type Publisher interface + Provide func(contract plugin.Contract, value any) error + type ReconcileCandidate struct + ExpectedPlanFingerprint string + ExpectedSequence uint64 + Updates []EntryUpdate + type ReconcileReceipt struct + AfterSequence uint64 + BeforeSequence uint64 + FormatVersion uint64 + PlanFingerprint string + Retirements []EntryRetirement + StateTransfers []EntryStateTransfer + Transitions []EntryTransition + type Registry struct + func NewRegistry() *Registry + func (registry *Registry) Register(implementation string, factory Factory) error + func (registry *Registry) RegisterArtifact(implementation string, artifact inspect.ArtifactIdentity, factory Factory) error + type Services interface + Lookup func(name string) (value any, contract plugin.Contract, provider string, revision uint64, ...) + type StateLifecycle interface + Quiesce func(StateQuiescer) error + Restored func() (snapshot json.RawMessage, available bool, err error) + Snapshot func(StateSnapshotter) error + type StateMigration struct + EntryID string + Schema plugin.Contract + Snapshot json.RawMessage + SourceImplementation string + type StateQuiescer func(context.Context) (StateResumer, error) + type StateResumer func(context.Context) error + type StateSnapshotter func(context.Context) (json.RawMessage, error)