worker

package
v0.0.0-...-89d5bac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2020 License: AGPL-3.0, AGPL-3.0-or-later Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithDefaultMemoryLimit

func WithDefaultMemoryLimit(_ context.Context, _ oci.Client, _ *containers.Container, s *oci.Spec) error

func WithNetNsHook

func WithNetNsHook(ipFile string) oci.SpecOpts

Types

type SnapshotManager

type SnapshotManager struct {
	// contains filtered or unexported fields
}

func NewSnapshotManager

func NewSnapshotManager(ctx context.Context, client *containerd.Client, runtime string) (*SnapshotManager, error)

func (*SnapshotManager) CreateLayerFromBase

func (m *SnapshotManager) CreateLayerFromBase(layerName string) error

func (*SnapshotManager) CreateRoView

func (m *SnapshotManager) CreateRoView(layerName, containerName string) ([]mount.Mount, error)

func (*SnapshotManager) GetRwMounts

func (m *SnapshotManager) GetRwMounts(layerName, containerName string) ([]mount.Mount, error)

type Worker

type Worker struct {
	ID          string
	ContainerID string

	IP net.IP
	// contains filtered or unexported fields
}

func NewLocalWorker

func NewLocalWorker(id string, pid uint32) *Worker

func NewWorker

func NewWorker(id string, client *containerd.Client, runtime, targetSnapshot string) (*Worker, error)

func NewWorkerWithSnapManager

func NewWorkerWithSnapManager(id string, client *containerd.Client, runtime, targetSnapshot string, snapManager *SnapshotManager, ctx context.Context) (*Worker, error)

func (*Worker) Activate

func (m *Worker) Activate() error

func (*Worker) Attach

func (m *Worker) Attach() error

func (*Worker) AwaitMessage

func (m *Worker) AwaitMessage(messageType string) controller.Message

func (*Worker) AwaitSignal

func (m *Worker) AwaitSignal(waitingFor syscall.Signal)

func (*Worker) Checkpoints

func (m *Worker) Checkpoints() []*State

func (*Worker) CleanSnapshot

func (m *Worker) CleanSnapshot(name string) error

func (*Worker) ClearMemRefs

func (m *Worker) ClearMemRefs() error

func (*Worker) Continue

func (m *Worker) Continue()

func (*Worker) ContinueTid

func (m *Worker) ContinueTid(tid int, signal syscall.Signal)

func (*Worker) ContinueWith

func (m *Worker) ContinueWith(signal syscall.Signal)

func (*Worker) Detach

func (m *Worker) Detach() error

func (*Worker) End

func (m *Worker) End() error

func (*Worker) GetImage

func (m *Worker) GetImage(name string) (containerd.Image, error)

func (*Worker) InitialCheckpoint

func (m *Worker) InitialCheckpoint() (*State, error)

func (*Worker) ListImages

func (m *Worker) ListImages() ([]containerd.Image, error)

func (*Worker) PauseAtSignal

func (m *Worker) PauseAtSignal(waitingFor syscall.Signal)

func (*Worker) Pid

func (m *Worker) Pid() int

func (*Worker) Restore

func (m *Worker) Restore() error

func (*Worker) SendFunction

func (m *Worker) SendFunction(function string) error

func (*Worker) SendMessage

func (m *Worker) SendMessage(messageType string, data interface{}) error

func (*Worker) SendRequest

func (m *Worker) SendRequest(request interface{}) (interface{}, error)

func (*Worker) SendSignal

func (m *Worker) SendSignal(signal syscall.Signal) error

func (*Worker) SendSignalCont

func (m *Worker) SendSignalCont(signal syscall.Signal) error

func (*Worker) SetRegs

func (m *Worker) SetRegs(state *State) error

func (*Worker) Start

func (m *Worker) Start() error

func (*Worker) State

func (m *Worker) State() (*State, error)

func (*Worker) Stop

func (m *Worker) Stop() error

func (*Worker) Streams

func (m *Worker) Streams() (*io.PipeWriter, *io.PipeReader, *io.PipeReader)

func (*Worker) TakeCheckpoint

func (m *Worker) TakeCheckpoint() error

func (*Worker) WithStdPipes

func (m *Worker) WithStdPipes(stderrWriter io.Writer, stdoutWriters ...io.Writer)

func (*Worker) WithSyscallTrace

func (m *Worker) WithSyscallTrace(to io.Writer)

Directories

Path Synopsis
images

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL