container

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthEncode

func AuthEncode(auth Auth) string

func Close

func Close(engine Engine) error

func CopyFrom

func CopyFrom(engine Engine, containerID string, sourcePath string, destPath string, handles ...ctxpkg.Handle) error

func CopyTo

func CopyTo(engine Engine, containerID string, sourcePath string, destPath string, handles ...ctxpkg.Handle) error

func Exec

func Exec(engine Engine, containerID string, cmd []string, handles ...ctxpkg.Handle) (string, error)

func Logs

func Logs(engine Engine, containerID string) (string, error)

func LogsTail

func LogsTail(engine Engine, containerID string, lines int64) (string, error)

func Pull

func Pull(engine Engine, ref string, handles ...ctxpkg.Handle) (string, error)

func PullAuth

func PullAuth(engine Engine, ref string, auth Auth) (string, error)

func Remove

func Remove(engine Engine, containerID string) error

func Run

func Run(engine Engine, img string, cmd []string) (string, error)

func Stop

func Stop(engine Engine, containerID string) error

func Wait

func Wait(engine Engine, containerID string, timeoutSeconds int64) (int64, error)

func WaitCtx

func WaitCtx(engine Engine, h ctxpkg.Handle, containerID string) (int64, error)

Types

type Auth

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

func Login

func Login(username string, password string, server string) Auth

func LoginFromConfig

func LoginFromConfig(server string) (Auth, error)

type BuildOutput

type BuildOutput struct {
	ImageID string
	Output  string
}

func Build

func Build(engine Engine, path string, tag string) (BuildOutput, error)

type Config

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

func APIVersion

func APIVersion(cfg Config, version string) Config

func Host

func Host(cfg Config, host string) Config

func New

func New() Config

type ContainerEvent

type ContainerEvent struct {
	ID       string
	Resource string
	Action   string
	Actor    string
	Time     string
}

func Events

func Events(engine Engine, timeoutSeconds int64) ([]ContainerEvent, error)

func EventsCtx

func EventsCtx(engine Engine, h ctxpkg.Handle) ([]ContainerEvent, error)

type ContainerInfo

type ContainerInfo struct {
	ID     string
	Image  string
	Status string
	State  string
	Names  []string
}

func Inspect

func Inspect(engine Engine, containerID string) (ContainerInfo, error)

func ListContainers

func ListContainers(engine Engine) ([]ContainerInfo, error)

type Engine

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

func Connect

func Connect() (Engine, error)

func ConnectRemote

func ConnectRemote(host string) (Engine, error)

func Open

func Open(cfg Config) (Engine, error)

type ImageInfo

type ImageInfo struct {
	ID   string
	Tags []string
	Size int64
}

func ListImages

func ListImages(engine Engine) ([]ImageInfo, error)

Jump to

Keyboard shortcuts

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