engine

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

Engine is the Runtime backed by a real Docker daemon, through the Docker Engine SDK. This is the only package in WittyPlay that imports it, so nothing else links it.

func Connect

func Connect() (*Engine, error)

Connect makes an Engine for DOCKER_HOST, or the platform's default socket. It doesn't reach the daemon: Available does, and says what it found.

func (*Engine) Available

func (e *Engine) Available(ctx context.Context) docker.Status

Available pings the daemon, with whatever time ctx allows.

func (*Engine) Close

func (e *Engine) Close() error

Close lets go of the connection.

func (*Engine) Create

func (e *Engine) Create(ctx context.Context, s docker.Spec) (string, error)

Create checks the spec again, then makes the container from it, field by field.

func (*Engine) EnsureNetwork

func (e *Engine) EnsureNetwork(ctx context.Context, n docker.NetworkSpec) (docker.NetworkInfo, error)

EnsureNetwork finds WittyPlay's network or makes it: a bridge of its own, with no inter-container traffic, so one session can't reach another.

func (*Engine) Inspect

func (e *Engine) Inspect(ctx context.Context, id string) (docker.Info, error)

func (*Engine) List

func (e *Engine) List(ctx context.Context, labels map[string]string) ([]docker.Info, error)

func (*Engine) Logs

func (e *Engine) Logs(ctx context.Context, id string, tail int) (string, error)

Logs returns the end of what a container said, at most 64 KiB.

func (*Engine) Pause

func (e *Engine) Pause(ctx context.Context, id string) error

func (*Engine) Pull

func (e *Engine) Pull(ctx context.Context, ref string) error

Pull fetches an image, which must be pinned to a digest.

func (*Engine) Remove

func (e *Engine) Remove(ctx context.Context, id string) error

func (*Engine) Start

func (e *Engine) Start(ctx context.Context, id string) error

func (*Engine) Stop

func (e *Engine) Stop(ctx context.Context, id string, timeout time.Duration) error

func (*Engine) Unpause

func (e *Engine) Unpause(ctx context.Context, id string) error

Jump to

Keyboard shortcuts

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