client

package
v1.10.4 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	None         mode = 0
	InContainer  mode = 1
	LinuxNsenter mode = 2
)

Variables

View Source
var ErrModeNone = errors.New("mode not set")

Functions

func Nsenter added in v1.7.4

func Nsenter(
	pid int,
	proto graph.NetProto,
	onconn func(*graph.Connection),
) (
	err error,
)

Types

type Docker

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

func NewDocker

func NewDocker(opts ...Option) (rv *Docker, err error)

func (*Docker) Close

func (d *Docker) Close() (err error)

func (*Docker) Containers

func (d *Docker) Containers(
	ctx context.Context,
	proto graph.NetProto,
	detailed, deep bool,
	skipkeys []string,
	progress func(int, int),
) (rv []*graph.Container, err error)

func (*Docker) Mode added in v1.7.4

func (d *Docker) Mode() string

type DockerClient added in v1.7.4

type DockerClient interface {
	ContainerList(context.Context, container.ListOptions) ([]types.Container, error)
	ContainerInspect(context.Context, string) (types.ContainerJSON, error)
	ContainerExecCreate(context.Context, string, types.ExecConfig) (types.IDResponse, error)
	ContainerExecAttach(context.Context, string, types.ExecStartCheck) (types.HijackedResponse, error)
	ContainerTop(ctx context.Context, containerID string, arguments []string) (container.ContainerTopOKBody, error)
	Close() error
}

func Default added in v1.7.4

func Default() (rv DockerClient, err error)

type Option added in v1.7.4

type Option func(*options)

func WithClientCreator added in v1.7.4

func WithClientCreator(c createClient) Option

func WithMode added in v1.7.4

func WithMode(m mode) Option

func WithNsEnter added in v1.7.4

func WithNsEnter(e nsEnter) Option

Jump to

Keyboard shortcuts

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