Documentation
¶
Index ¶
- Constants
- Variables
- type ExitResult
- type Options
- type Owner
- type ReadRequest
- type ReadResult
- type ResourceLimits
- type SecretResolver
- type StartRequest
- type Status
- type Stream
- type Supervisor
- func (s *Supervisor) Attach(owner Owner, clientKey string) (Status, error)
- func (s *Supervisor) Close(ctx context.Context, owner Owner, handle string) error
- func (s *Supervisor) CloseStdin(owner Owner, handle string) error
- func (s *Supervisor) GetStatus(owner Owner, handle string) (Status, error)
- func (s *Supervisor) Kill(owner Owner, handle string) error
- func (s *Supervisor) Read(ctx context.Context, owner Owner, handle string, stream Stream, ...) (ReadResult, error)
- func (s *Supervisor) RestorePlugin(pluginInstanceID, environmentScope string) error
- func (s *Supervisor) Revoke(ctx context.Context, owner Owner) error
- func (s *Supervisor) RevokePlugin(ctx context.Context, pluginInstanceID, environmentScope string) error
- func (s *Supervisor) Shutdown(ctx context.Context) error
- func (s *Supervisor) Start(ctx context.Context, owner Owner, request StartRequest) (Status, error)
- func (s *Supervisor) Terminate(ctx context.Context, owner Owner, handle string) error
- func (s *Supervisor) Wait(ctx context.Context, owner Owner, handle string) (ExitResult, error)
- func (s *Supervisor) WriteStdin(ctx context.Context, owner Owner, handle string, data []byte) (int, error)
Constants ¶
View Source
const ( MaxArguments = 256 MaxArgumentBytes = 64 << 10 MaxEnvironmentEntries = 128 MaxEnvironmentBytes = 64 << 10 MaxOutputBufferBytes = 16 << 20 MaxRuntimeMilliseconds = 24 * 60 * 60 * 1000 MaxClientKeyBytes = 256 MaxOwnerFieldBytes = 256 MaxStdinBytes = 16 << 20 )
Variables ¶
View Source
var ( ErrInvalidRequest = errors.New("PROCESS_INVALID_REQUEST") ErrPermissionDenied = errors.New("PROCESS_PERMISSION_DENIED") ErrNotFound = errors.New("PROCESS_NOT_FOUND") ErrLaunchConflict = errors.New("PROCESS_LAUNCH_CONFLICT") ErrRevoked = errors.New("PROCESS_OWNER_REVOKED") ErrClosed = errors.New("PROCESS_SUPERVISOR_CLOSED") )
Functions ¶
This section is empty.
Types ¶
type ExitResult ¶
type Owner ¶
func (Owner) ValidForHost ¶
type ReadRequest ¶
type ReadResult ¶
type ResourceLimits ¶
type StartRequest ¶
type StartRequest struct {
Program string `json:"program"`
Argv []string `json:"argv,omitempty"`
Cwd string `json:"cwd,omitempty"`
Environment map[string]string `json:"environment,omitempty"`
EnvironmentRemovals []string `json:"environment_removals,omitempty"`
SecretReferences map[string]string `json:"secret_references,omitempty"`
ClientKey string `json:"client_key"`
Limits ResourceLimits `json:"resource_limits,omitempty"`
}
type Supervisor ¶
type Supervisor struct {
// contains filtered or unexported fields
}
func NewSupervisor ¶
func NewSupervisor(options Options) (*Supervisor, error)
func (*Supervisor) Attach ¶
func (s *Supervisor) Attach(owner Owner, clientKey string) (Status, error)
func (*Supervisor) CloseStdin ¶
func (s *Supervisor) CloseStdin(owner Owner, handle string) error
func (*Supervisor) GetStatus ¶
func (s *Supervisor) GetStatus(owner Owner, handle string) (Status, error)
func (*Supervisor) Read ¶
func (s *Supervisor) Read(ctx context.Context, owner Owner, handle string, stream Stream, request ReadRequest) (ReadResult, error)
func (*Supervisor) RestorePlugin ¶
func (s *Supervisor) RestorePlugin(pluginInstanceID, environmentScope string) error
func (*Supervisor) RevokePlugin ¶
func (s *Supervisor) RevokePlugin(ctx context.Context, pluginInstanceID, environmentScope string) error
func (*Supervisor) Start ¶
func (s *Supervisor) Start(ctx context.Context, owner Owner, request StartRequest) (Status, error)
func (*Supervisor) Wait ¶
func (s *Supervisor) Wait(ctx context.Context, owner Owner, handle string) (ExitResult, error)
func (*Supervisor) WriteStdin ¶
Click to show internal directories.
Click to hide internal directories.