Versions in this module Expand all Collapse all v4 v4.0.0 Jul 20, 2026 Changes in this version + var ErrGenerationUnavailable = errors.New("plugin host generation unavailable") + var ErrHostIncompatible = errors.New("plugin host incompatible") + var ErrHostNotFound = errors.New("plugin host not found") + var ErrHostUnavailable = errors.New("plugin host unavailable") + func SetDefaultManager(manager Manager) + type ArtifactRef struct + ArtifactPath string + ArtifactSHA256 string + EntrypointPath string + EntrypointSHA256 string + ManifestPath string + ManifestSHA256 string + PackageID string + Version string + type DispatchInput struct + Body []byte + BridgeCapability []byte + Deadline time.Time + Generation uint64 + IdempotencyKey string + Metadata RequestMetadata + Method string + PackageID string + PrincipalJSON []byte + RequestID string + RouteID string + Version string + type DispatchOutput struct + Body []byte + FailureCode string + Headers []Header + OperationID string + StatusCode uint32 + type DrainResult struct + Drained bool + InFlight uint64 + type Header struct + Name string + Value string + type HostHealth struct + DetailsJSON string + Healthy bool + LeaseID string + type Manager interface + Dispatch func(context.Context, DispatchInput) (DispatchOutput, error) + Drain func(context.Context, string, string, uint64, time.Time) error + Health func(context.Context, string, string, uint64) (HostHealth, error) + Rollback func(context.Context, string, string, uint64) error + Start func(context.Context, ArtifactRef, uint64) error + Stop func(context.Context, string, string, uint64) error + func DefaultManager() Manager + type ManagerConfig struct + BridgeFactory packagebridge.SessionFactory + RuntimeDir string + StartupTimeout time.Duration + type MigrationCheckpointRecorder func(context.Context, MigrationOutput) error + type MigrationInput struct + BridgeCapability []byte + Checkpoint string + Deadline time.Time + Generation uint64 + MigrationID string + PackageID string + Version string + type MigrationManager interface + Migrate func(context.Context, MigrationInput, MigrationCheckpointRecorder) (MigrationOutput, error) + type MigrationOutput struct + Checkpoint string + Complete bool + FailureCode string + HealthGeneration uint64 + HealthLeaseID string + ValidationDigest string + type RequestMetadata struct + ClientIP string + Headers map[string][]string + NodeID uint + Path string + PathParams map[string]string + Query map[string][]string + TrustedAgentWebSocketAuth bool + TrustedAgentWebSocketForwardNode bool + UserAgent string + type Supervisor struct + func NewManager(ManagerConfig) (*Supervisor, error) + func NewManager(config ManagerConfig) (*Supervisor, error) + func (*Supervisor) Close() error + func (*Supervisor) Dispatch(context.Context, DispatchInput) (DispatchOutput, error) + func (*Supervisor) Drain(context.Context, string, string, uint64, time.Time) error + func (*Supervisor) Health(context.Context, string, string, uint64) (HostHealth, error) + func (*Supervisor) Migrate(context.Context, MigrationInput, MigrationCheckpointRecorder) (MigrationOutput, error) + func (*Supervisor) OpenWebSocket(context.Context, WebSocketInput) (*WebSocketRelay, error) + func (*Supervisor) Rollback(context.Context, string, string, uint64) error + func (*Supervisor) Shutdown(context.Context) error + func (*Supervisor) Start(context.Context, ArtifactRef, uint64) error + func (*Supervisor) Stop(context.Context, string, string, uint64) error + func (m *Supervisor) Close() error + func (m *Supervisor) Dispatch(ctx context.Context, input DispatchInput) (DispatchOutput, error) + func (m *Supervisor) Drain(ctx context.Context, packageID, version string, generation uint64, ...) error + func (m *Supervisor) Health(ctx context.Context, packageID, version string, generation uint64) (HostHealth, error) + func (m *Supervisor) Migrate(ctx context.Context, input MigrationInput, ...) (MigrationOutput, error) + func (m *Supervisor) OpenWebSocket(ctx context.Context, input WebSocketInput) (*WebSocketRelay, error) + func (m *Supervisor) Rollback(ctx context.Context, packageID, version string, generation uint64) error + func (m *Supervisor) Shutdown(ctx context.Context) error + func (m *Supervisor) Start(ctx context.Context, ref ArtifactRef, generation uint64) error + func (m *Supervisor) Stop(ctx context.Context, packageID, version string, generation uint64) error + type WebSocketClose struct + Code uint32 + Reason string + type WebSocketFrame struct + Close *WebSocketClose + Data []byte + type WebSocketInput struct + BridgeCapability []byte + Deadline time.Time + Generation uint64 + IdempotencyKey string + Metadata RequestMetadata + PackageID string + PrincipalJSON []byte + RequestID string + RouteID string + Version string + type WebSocketManager interface + OpenWebSocket func(context.Context, WebSocketInput) (*WebSocketRelay, error) + type WebSocketRelay struct + func (*WebSocketRelay) Close(WebSocketClose) error + func (*WebSocketRelay) Recv() (WebSocketFrame, error) + func (*WebSocketRelay) Send(WebSocketFrame) error + func (r *WebSocketRelay) Close(close WebSocketClose) error + func (r *WebSocketRelay) Recv() (WebSocketFrame, error) + func (r *WebSocketRelay) Send(frame WebSocketFrame) error