Documentation
¶
Index ¶
- Constants
- type Client
- type Executor
- func (e *Executor) Create(id string, spec specs.Spec, stdout, stderr io.WriteCloser) error
- func (e *Executor) IsRunning(id string) (bool, error)
- func (e *Executor) ProcessEvent(id string, et libcontainerdtypes.EventType, ei libcontainerdtypes.EventInfo) error
- func (e *Executor) Restore(id string, stdout, stderr io.WriteCloser) (bool, error)
- func (e *Executor) Signal(id string, signal int) error
- type ExitHandler
Constants ¶
View Source
const PluginNamespace = "plugins.moby"
PluginNamespace is the name used for the plugins namespace
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
Create(ctx context.Context, containerID string, spec *specs.Spec, runtimeOptions interface{}) error
Restore(ctx context.Context, containerID string, attachStdio libcontainerdtypes.StdioCallback) (alive bool, pid int, err error)
Status(ctx context.Context, containerID string) (libcontainerdtypes.Status, error)
Delete(ctx context.Context, containerID string) error
DeleteTask(ctx context.Context, containerID string) (uint32, time.Time, error)
Start(ctx context.Context, containerID, checkpointDir string, withStdin bool, attachStdio libcontainerdtypes.StdioCallback) (pid int, err error)
SignalProcess(ctx context.Context, containerID, processID string, signal int) error
}
Client is used by the exector to perform operations. TODO(@cpuguy83): This should really just be based off the containerd client interface. However right now this whole package is tied to github.com/docker/docker/libcontainerd
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor is the containerd client implementation of a plugin executor
func New ¶
func New(ctx context.Context, rootDir string, cli *containerd.Client, exitHandler ExitHandler) (*Executor, error)
New creates a new containerd plugin executor
func (*Executor) ProcessEvent ¶
func (e *Executor) ProcessEvent(id string, et libcontainerdtypes.EventType, ei libcontainerdtypes.EventInfo) error
ProcessEvent handles events from containerd All events are ignored except the exit event, which is sent of to the stored handler
type ExitHandler ¶
ExitHandler represents an object that is called when the exit event is received from containerd
Click to show internal directories.
Click to hide internal directories.