ctrd

package
v0.0.0-...-6d8d8d4 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: Apache-2.0 Imports: 30 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cleanup

func Cleanup(pid int) error

Cleanup kill containerd instance process

func SetCredential

func SetCredential(user string)

SetCredential sets user and secret for image registry

func SetImageProxy

func SetImageProxy(p string)

SetImageProxy sets value of image http proxy

func StartContainerd

func StartContainerd(homeDir string, debug bool) (int, error)

StartContainerd create a new containerd instance.

Types

type Client

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

Client is the wrapper of a containerd client.

func NewCtrdClient

func NewCtrdClient() (*Client, error)

NewCtrdClient create a client of containerd

func (*Client) CreateSnapshot

func (cli *Client) CreateSnapshot(ctx context.Context, id, ref string) error

CreateSnapshot creates an active snapshot with image's name and id.

func (*Client) DeleteContainer

func (cli *Client) DeleteContainer(ctx context.Context, id string) error

DeleteContainer deletes a containerd container

func (*Client) GetContainer

func (cli *Client) GetContainer(ctx context.Context, id string) (containers.Container, error)

GetContainer is to fetch a container info from containerd

func (*Client) GetImage

func (cli *Client) GetImage(ctx context.Context, imageName string) (containerd.Image, error)

GetImage inspect a containerd image

func (*Client) GetMounts

func (cli *Client) GetMounts(ctx context.Context, id string) ([]mount.Mount, error)

GetMounts returns the mounts for the active snapshot transaction identified by key.

func (*Client) GetSnapshot

func (cli *Client) GetSnapshot(ctx context.Context, id string) (snapshots.Info, error)

GetSnapshot returns the snapshot's info by id.

func (*Client) NewContainer

func (cli *Client) NewContainer(ctx context.Context, id string) error

NewContainer just create a very simple container for migration just load container id to boltdb

func (*Client) PullImage

func (cli *Client) PullImage(ctx context.Context, ref, snapshotter string, manifestOnly bool) error

PullImage prepares all images using by docker containers, that will be used to create new pouch container.

func (*Client) RemoveSnapshot

func (cli *Client) RemoveSnapshot(ctx context.Context, id string) error

RemoveSnapshot remove the snapshot by id.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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