ctrd

package
v0.0.0-...-cbfbdd4 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2018 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetImageProxy

func SetImageProxy(p string)

SetImageProxy sets value of image http proxy

Types

type Ctrd

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

Ctrd is a wrapper client for containerd grpc client.

func NewCtrd

func NewCtrd(homeDir string, debug bool) (*Ctrd, error)

NewCtrd create a new Ctrd instance.

func (*Ctrd) Cleanup

func (ctrd *Ctrd) Cleanup() error

Cleanup kill containerd instance process

func (*Ctrd) CreateSnapshot

func (ctrd *Ctrd) CreateSnapshot(ctx context.Context, id, ref string) error

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

func (*Ctrd) DeleteContainer

func (ctrd *Ctrd) DeleteContainer(ctx context.Context, id string) error

DeleteContainer deletes a containerd container

func (*Ctrd) GetContainer

func (ctrd *Ctrd) GetContainer(ctx context.Context, id string) (containers.Container, error)

GetContainer is to fetch a container info from containerd

func (*Ctrd) GetImage

func (ctrd *Ctrd) GetImage(ctx context.Context, imageName string) (containerd.Image, error)

GetImage inspect a containerd image

func (*Ctrd) GetMounts

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

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

func (*Ctrd) GetSnapshot

func (ctrd *Ctrd) GetSnapshot(ctx context.Context, id string) (snapshots.Info, error)

GetSnapshot returns the snapshot's info by id.

func (*Ctrd) NewContainer

func (ctrd *Ctrd) NewContainer(ctx context.Context, id string) error

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

func (*Ctrd) PullImage

func (ctrd *Ctrd) PullImage(ctx context.Context, imageName string) error

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

func (*Ctrd) RemoveSnapshot

func (ctrd *Ctrd) RemoveSnapshot(ctx context.Context, id string) error

RemoveSnapshot remove the snapshot by id.

Jump to

Keyboard shortcuts

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