Documentation
¶
Overview ¶
Package pluginhost exposes fail-closed stubs on platforms that cannot provide the Unix socket and descriptor isolation required by package hosts.
Index ¶
- Variables
- func SetDefaultManager(manager Manager)
- type ArtifactRef
- type DispatchInput
- type DispatchOutput
- type DrainResult
- type Header
- type HostHealth
- type Manager
- type ManagerConfig
- type MigrationCheckpointRecorder
- type MigrationInput
- type MigrationManager
- type MigrationOutput
- type RequestMetadata
- type Supervisor
- 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
- type WebSocketClose
- type WebSocketFrame
- type WebSocketInput
- type WebSocketManager
- type WebSocketRelay
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrHostNotFound = errors.New("plugin host not found") ErrHostIncompatible = errors.New("plugin host incompatible") )
Functions ¶
func SetDefaultManager ¶
func SetDefaultManager(manager Manager)
Types ¶
type ArtifactRef ¶
type DispatchInput ¶
type DispatchOutput ¶
type DrainResult ¶
type HostHealth ¶
type Manager ¶
type Manager interface {
Start(context.Context, ArtifactRef, uint64) error
Dispatch(context.Context, DispatchInput) (DispatchOutput, error)
Health(context.Context, string, string, uint64) (HostHealth, error)
Drain(context.Context, string, string, uint64, time.Time) error
Stop(context.Context, string, string, uint64) error
Rollback(context.Context, string, string, uint64) error
}
func DefaultManager ¶
func DefaultManager() Manager
type ManagerConfig ¶
type ManagerConfig struct {
RuntimeDir string
StartupTimeout time.Duration
BridgeFactory packagebridge.SessionFactory
}
type MigrationCheckpointRecorder ¶
type MigrationCheckpointRecorder func(context.Context, MigrationOutput) error
type MigrationInput ¶
type MigrationManager ¶
type MigrationManager interface {
Migrate(context.Context, MigrationInput, MigrationCheckpointRecorder) (MigrationOutput, error)
}
type MigrationOutput ¶
type RequestMetadata ¶
type RequestMetadata struct {
Path string `json:"path,omitempty"`
Query map[string][]string `json:"query,omitempty"`
Headers map[string][]string `json:"headers,omitempty"`
PathParams map[string]string `json:"path_params,omitempty"`
ClientIP string `json:"client_ip,omitempty"`
UserAgent string `json:"user_agent,omitempty"`
NodeID uint `json:"node_id,omitempty"`
TrustedAgentWebSocketAuth bool `json:"trusted_agent_websocket_auth,omitempty"`
TrustedAgentWebSocketForwardNode bool `json:"trusted_agent_websocket_forward_node,omitempty"`
}
type Supervisor ¶
type Supervisor struct{}
func NewManager ¶
func NewManager(ManagerConfig) (*Supervisor, error)
func (*Supervisor) Close ¶
func (*Supervisor) Close() error
func (*Supervisor) Dispatch ¶
func (*Supervisor) Dispatch(context.Context, DispatchInput) (DispatchOutput, error)
func (*Supervisor) Health ¶
func (*Supervisor) Health(context.Context, string, string, uint64) (HostHealth, error)
func (*Supervisor) Migrate ¶
func (*Supervisor) Migrate(context.Context, MigrationInput, MigrationCheckpointRecorder) (MigrationOutput, error)
func (*Supervisor) OpenWebSocket ¶
func (*Supervisor) OpenWebSocket(context.Context, WebSocketInput) (*WebSocketRelay, error)
func (*Supervisor) Start ¶
func (*Supervisor) Start(context.Context, ArtifactRef, uint64) error
type WebSocketClose ¶
type WebSocketFrame ¶
type WebSocketFrame struct {
Data []byte
Close *WebSocketClose
}
type WebSocketInput ¶
type WebSocketManager ¶
type WebSocketManager interface {
OpenWebSocket(context.Context, WebSocketInput) (*WebSocketRelay, error)
}
type WebSocketRelay ¶
type WebSocketRelay struct{}
func (*WebSocketRelay) Close ¶
func (*WebSocketRelay) Close(WebSocketClose) error
func (*WebSocketRelay) Recv ¶
func (*WebSocketRelay) Recv() (WebSocketFrame, error)
func (*WebSocketRelay) Send ¶
func (*WebSocketRelay) Send(WebSocketFrame) error
Click to show internal directories.
Click to hide internal directories.