engine

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	List(ctx context.Context, options ListOptions) ([]Container, error)

	Pull(ctx context.Context, image, platform string, options PullOptions) error

	Create(ctx context.Context, spec Container, options CreateOptions) (string, error)
	Delete(ctx context.Context, container string, options DeleteOptions) error

	Inspect(ctx context.Context, container string) (Container, error)

	Logs(ctx context.Context, container string, options LogsOptions) error

	Run(ctx context.Context, spec Container, options RunOptions) error
	Exec(ctx context.Context, containerID string, command []string, options ExecOptions) error

	PortForward(ctx context.Context, containerID, address string, ports map[int]int, readyChan chan struct{}) error
}

type Container

type Container struct {
	ID   string
	Name string

	Labels map[string]string

	Image    string
	Platform string

	Privileged bool

	RunAsUser  string
	RunAsGroup string

	MaxFiles     int64
	MaxProcesses int64

	Env map[string]string
	Dir string

	Command []string
	Args    []string

	Hostname  string
	IPAddress net.IP

	Ports  []ContainerPort
	Mounts []ContainerMount
}

type ContainerMount

type ContainerMount struct {
	Path string

	Volume   string
	HostPath string
}

type ContainerPort

type ContainerPort struct {
	Name string

	Port  int
	Proto Protocol

	HostIP   string
	HostPort int
}

type CreateOptions

type CreateOptions struct {
}

type DeleteOptions

type DeleteOptions struct {
}

type ExecOptions added in v0.2.6

type ExecOptions struct {
	Privileged bool

	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer

	Dir  string
	User string

	Env map[string]string
}

type ListOptions

type ListOptions struct {
	All bool

	LabelSelector map[string]string
}

type LogsOptions

type LogsOptions struct {
	Follow bool

	Stdout io.Writer
	Stderr io.Writer
}

type Protocol

type Protocol string
const (
	ProtocolTCP Protocol = "tcp"
	ProtocolUDP Protocol = "udp"
)

type PullOptions

type PullOptions struct {
	Stdout io.Writer
	Stderr io.Writer
}

type RunOptions added in v0.2.6

type RunOptions struct {
	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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