shim

package
v1.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2017 License: Apache-2.0, CC-BY-SA-4.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const InitPidFile = "init.pid"
View Source
const RuncRoot = "/run/containerd/runc"

Variables

This section is empty.

Functions

func NewLocal

func NewLocal(s *Service) shimapi.ShimClient

NewLocal returns a shim client implementation for issue commands to a shim

func WithLocal

func WithLocal(publisher events.Publisher) func(context.Context, Config) (shim.ShimClient, io.Closer, error)

WithLocal uses an in process shim

Types

type Client

type Client struct {
	shim.ShimClient
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, config Config, opt ClientOpt) (*Client, error)

New returns a new shim client

func (*Client) Close

func (c *Client) Close() error

func (*Client) IsAlive

func (c *Client) IsAlive(ctx context.Context) (bool, error)

IsAlive returns true if the shim can be contacted. NOTE: a negative answer doesn't mean that the process is gone.

func (*Client) KillShim

func (c *Client) KillShim(ctx context.Context) error

KillShim kills the shim forcefully and wait for the process to disappear

func (*Client) StopShim

func (c *Client) StopShim(ctx context.Context) error

StopShim signals the shim to exit and wait for the process to disappear

type ClientOpt

type ClientOpt func(context.Context, Config) (shim.ShimClient, io.Closer, error)

func WithConnect

func WithConnect(address string) ClientOpt

WithConnect connects to an existing shim

func WithStart

func WithStart(binary, address, daemonAddress, cgroup string, debug bool, exitHandler func()) ClientOpt

WithStart executes a new shim process

type Config

type Config struct {
	Path          string
	Namespace     string
	WorkDir       string
	Criu          string
	RuntimeRoot   string
	SystemdCgroup bool
}

type Service

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

func NewService

func NewService(config Config, publisher events.Publisher) (*Service, error)

NewService returns a new shim service that can be used via GRPC

func (*Service) Checkpoint

func (*Service) CloseIO

func (*Service) Create

func (*Service) Delete

func (*Service) DeleteProcess

func (*Service) Exec

func (*Service) Kill

func (*Service) ListPids

func (*Service) Pause

func (*Service) ResizePty

func (*Service) Resume

func (*Service) ShimInfo

func (*Service) Start

func (*Service) State

func (*Service) Update

func (*Service) Wait

Directories

Path Synopsis
Package shim is a generated protocol buffer package.
Package shim is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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