types

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Docker     = "docker"
	Containerd = "containerd"
	CriO       = "cri-o"
	Podman     = "podman"
)

Variables

View Source
var (
	ErrMethodNotImplemented = errors.New("method not implemented")
)

Functions

This section is empty.

Types

type Container

type Container struct {
	ID         string
	Name       string
	Image      string
	ImageID    string
	State      string
	Pid        int
	PidMode    string
	NetMode    string
	Envs       []string
	Labels     map[string]string
	User       string
	Privileged bool
	Memory     int64
	CPUs       string
	IPAddress  string
	Created    time.Time
	Started    time.Time
	Finished   time.Time
}

type ContainerListOption

type ContainerListOption struct {
	All bool
}

type Image

type Image struct {
	ID        string
	Digest    string
	Size      int64
	Envs      []string
	User      string
	Labels    map[string]string
	RepoTags  []string
	Layers    []string
	CreatedAt time.Time
}

type ImageHistory

type ImageHistory struct {
	ID   string
	Cmd  string
	Size int64
}

type Options

type Options struct {
	Host string
}

type Runtime

type Runtime interface {
	Name() string
	ImageList(ctx context.Context) ([]*Image, error)
	ImageInspect(ctx context.Context, imageId string) (*Image, error)
	ContainerList(ctx context.Context, option *ContainerListOption) ([]*Container, error)
	ContainerInspect(ctx context.Context, containerId string) (*Container, error)
	ContainerStart(ctx context.Context, containerId string) error
	ContainerStop(ctx context.Context, containerId string) error
	ContainerPause(ctx context.Context, containerId string) error
	ContainerResume(ctx context.Context, containerId string) error
}

Jump to

Keyboard shortcuts

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