containers

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: Apache-2.0 Imports: 31 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrLostSync = errors.New("lost synchronization with multiplexed stream")
)

Functions

func Attach

func Attach(ctx context.Context, nameOrID string, stdin io.Reader, stdout io.Writer, stderr io.Writer, attachReady chan bool, options *AttachOptions) error

Attach attaches to a running container

func Checkpoint

func Checkpoint(ctx context.Context, nameOrID string, options *CheckpointOptions) (*entities.CheckpointReport, error)

Checkpoint checkpoints the given container (identified by nameOrID). All additional options are options and allow for more fine grained control of the checkpoint process.

func Commit

func Commit(ctx context.Context, nameOrID string, options *CommitOptions) (handlers.IDResponse, error)

Commit creates a container image from a container. The container is defined by nameOrID. Use the CommitOptions for finer grain control on characteristics of the resulting image.

func ContainerInit

func ContainerInit(ctx context.Context, nameOrID string, options *InitOptions) error

ContainerInit takes a created container and executes all of the preparations to run the container except it will not start or attach to the container

func CopyFromArchive

func CopyFromArchive(ctx context.Context, nameOrID string, path string, reader io.Reader) (entities.ContainerCopyFunc, error)

func CopyToArchive

func CopyToArchive(ctx context.Context, nameOrID string, path string, writer io.Writer) (entities.ContainerCopyFunc, error)

func DemuxFrame

func DemuxFrame(r io.Reader, buffer []byte, length int) (frame []byte, err error)

DemuxFrame reads contents for frame from server multiplexed stdin/stdout/stderr/2nd error channel

func DemuxHeader

func DemuxHeader(r io.Reader, buffer []byte) (fd, sz int, err error)

DemuxHeader reads header for stream from server multiplexed stdin/stdout/stderr/2nd error channel

func Diff

func Diff(ctx context.Context, nameOrID string, options *DiffOptions) ([]archive.Change, error)

Diff provides the changes between two container layers

func ExecCreate

func ExecCreate(ctx context.Context, nameOrID string, config *handlers.ExecCreateConfig) (string, error)

ExecCreate creates a new exec session in an existing container. The exec session will not be started; that is done with ExecStart. Returns ID of new exec session, or an error if one occurred.

func ExecInspect

func ExecInspect(ctx context.Context, sessionID string, options *ExecInspectOptions) (*define.InspectExecSession, error)

ExecInspect inspects an existing exec session, returning detailed information about it.

func ExecStart

func ExecStart(ctx context.Context, sessionID string, options *ExecStartOptions) error

ExecStart starts (but does not attach to) a given exec session.

func ExecStartAndAttach

func ExecStartAndAttach(ctx context.Context, sessionID string, options *ExecStartAndAttachOptions) error

ExecStartAndAttach starts and attaches to a given exec session.

func Exists

func Exists(ctx context.Context, nameOrID string, options *ExistsOptions) (bool, error)

Exists is a quick, light-weight way to determine if a given container exists in local storage. The nameOrID can be a container name or a partial/full ID.

func Export

func Export(ctx context.Context, nameOrID string, w io.Writer, options *ExportOptions) error

Export creates a tarball of the given name or ID of a container. It requires an io.Writer be provided to write the tarball.

func GetMountedContainerPaths

func GetMountedContainerPaths(ctx context.Context, options *MountedContainerPathsOptions) (map[string]string, error)

GetMountedContainerPaths returns a map of mounted containers and their mount locations.

func Inspect

func Inspect(ctx context.Context, nameOrID string, options *InspectOptions) (*define.InspectContainerData, error)

Inspect returns low level information about a Container. The nameOrID can be a container name or a partial/full ID. The size bool determines whether the size of the container's root filesystem should be calculated. Calculating the size of a container requires extra work from the filesystem and is therefore slower.

func Kill

func Kill(ctx context.Context, nameOrID string, options *KillOptions) error

Kill sends a given signal to a given container. The signal should be the string representation of a signal like 'SIGKILL'. The nameOrID can be a container name or a partial/full ID

func List

func List(ctx context.Context, options *ListOptions) ([]entities.ListContainer, error)

List obtains a list of containers in local storage. All parameters to this method are optional. The filters are used to determine which containers are listed. The last parameter indicates to only return the most recent number of containers. The pod and size booleans indicate that pod information and rootfs size information should also be included. Finally, the sync bool synchronizes the OCI runtime and container state.

func Logs

func Logs(ctx context.Context, nameOrID string, options *LogOptions, stdoutChan, stderrChan chan string) error

Logs obtains a container's logs given the options provided. The logs are then sent to the stdout|stderr channels as strings.

func Mount

func Mount(ctx context.Context, nameOrID string, options *MountOptions) (string, error)

Mount mounts an existing container to the filesystem. It returns the path of the mounted container in string format.

func Pause

func Pause(ctx context.Context, nameOrID string, options *PauseOptions) error

Pause pauses a given container. The nameOrID can be a container name or a partial/full ID.

func Prune

func Prune(ctx context.Context, options *PruneOptions) ([]*reports.PruneReport, error)

Prune removes stopped and exited containers from local storage. The optional filters can be used for more granular selection of containers. The main error returned indicates if there were runtime errors like finding containers. Errors specific to the removal of a container are in the PruneContainerResponse structure.

func Remove

func Remove(ctx context.Context, nameOrID string, options *RemoveOptions) error

Remove removes a container from local storage. The force bool designates that the container should be removed forcibly (example, even it is running). The volumes bool dictates that a container's volumes should also be removed. The All option indicates that all containers should be removed The Ignore option indicates that if a container did not exist, ignore the error

func Rename

func Rename(ctx context.Context, nameOrID string, options *RenameOptions) error

Rename an existing container.

func ResizeContainerTTY

func ResizeContainerTTY(ctx context.Context, nameOrID string, options *ResizeTTYOptions) error

ResizeContainerTTY sets container's TTY height and width in characters

func ResizeExecTTY

func ResizeExecTTY(ctx context.Context, nameOrID string, options *ResizeExecTTYOptions) error

ResizeExecTTY sets session's TTY height and width in characters

func Restart

func Restart(ctx context.Context, nameOrID string, options *RestartOptions) error

Restart restarts a running container. The nameOrID can be a container name or a partial/full ID. The optional timeout specifies the number of seconds to wait for the running container to stop before killing it.

func Restore

func Restore(ctx context.Context, nameOrID string, options *RestoreOptions) (*entities.RestoreReport, error)

Restore restores a checkpointed container to running. The container is identified by the nameOrID option. All additional options are optional and allow finer control of the restore process.

func RunHealthCheck

func RunHealthCheck(ctx context.Context, nameOrID string, options *HealthCheckOptions) (*define.HealthCheckResults, error)

RunHealthCheck executes the container's healthcheck and returns the health status of the container.

func ShouldRestart

func ShouldRestart(ctx context.Context, nameOrID string, options *ShouldRestartOptions) (bool, error)

func Start

func Start(ctx context.Context, nameOrID string, options *StartOptions) error

Start starts a non-running container.The nameOrID can be a container name or a partial/full ID. The optional parameter for detach keys are to override the default detach key sequence.

func Stat

func Stat(ctx context.Context, nameOrID string, path string) (*entities.ContainerStatReport, error)

Stat checks if the specified path is on the container. Note that the stat report may be set even in case of an error. This happens when the path resolves to symlink pointing to a non-existent path.

func Stats

func Stats(ctx context.Context, containers []string, options *StatsOptions) (chan entities.ContainerStatsReport, error)

func Stop

func Stop(ctx context.Context, nameOrID string, options *StopOptions) error

Stop stops a running container. The timeout is optional. The nameOrID can be a container name or a partial/full ID

func Top

func Top(ctx context.Context, nameOrID string, options *TopOptions) ([]string, error)

Top gathers statistics about the running processes in a container. The nameOrID can be a container name or a partial/full ID. The descriptors allow for specifying which data to collect from the process.

func Unmount

func Unmount(ctx context.Context, nameOrID string, options *UnmountOptions) error

Unmount unmounts a container from the filesystem. The container must not be running or the unmount will fail.

func Unpause

func Unpause(ctx context.Context, nameOrID string, options *UnpauseOptions) error

Unpause resumes the given paused container. The nameOrID can be a container name or a partial/full ID.

func Wait

func Wait(ctx context.Context, nameOrID string, options *WaitOptions) (int32, error)

Wait blocks until the given container reaches a condition. If not provided, the condition will default to stopped. If the condition is stopped, an exit code for the container will be provided. The nameOrID can be a container name or a partial/full ID.

Types

type AttachOptions

type AttachOptions struct {
	DetachKeys *string
	Logs       *bool
	Stream     *bool
}

AttachOptions are optional options for attaching to containers

func (*AttachOptions) Changed

func (o *AttachOptions) Changed(fieldName string) bool

Changed

func (*AttachOptions) GetDetachKeys

func (o *AttachOptions) GetDetachKeys() string

GetDetachKeys

func (*AttachOptions) GetLogs

func (o *AttachOptions) GetLogs() bool

GetLogs

func (*AttachOptions) GetStream

func (o *AttachOptions) GetStream() bool

GetStream

func (*AttachOptions) ToParams

func (o *AttachOptions) ToParams() (url.Values, error)

ToParams

func (*AttachOptions) WithDetachKeys

func (o *AttachOptions) WithDetachKeys(value string) *AttachOptions

WithDetachKeys

func (*AttachOptions) WithLogs

func (o *AttachOptions) WithLogs(value bool) *AttachOptions

WithLogs

func (*AttachOptions) WithStream

func (o *AttachOptions) WithStream(value bool) *AttachOptions

WithStream

type CheckpointOptions

type CheckpointOptions struct {
	Export         *string
	IgnoreRootfs   *bool
	Keep           *bool
	LeaveRunning   *bool
	TCPEstablished *bool
}

CheckpointOptions are optional options for checkpointing containers

func (*CheckpointOptions) Changed

func (o *CheckpointOptions) Changed(fieldName string) bool

Changed

func (*CheckpointOptions) GetExport

func (o *CheckpointOptions) GetExport() string

GetExport

func (*CheckpointOptions) GetIgnoreRootfs

func (o *CheckpointOptions) GetIgnoreRootfs() bool

GetIgnoreRootfs

func (*CheckpointOptions) GetKeep

func (o *CheckpointOptions) GetKeep() bool

GetKeep

func (*CheckpointOptions) GetLeaveRunning

func (o *CheckpointOptions) GetLeaveRunning() bool

GetLeaveRunning

func (*CheckpointOptions) GetTCPEstablished

func (o *CheckpointOptions) GetTCPEstablished() bool

GetTCPEstablished

func (*CheckpointOptions) ToParams

func (o *CheckpointOptions) ToParams() (url.Values, error)

ToParams

func (*CheckpointOptions) WithExport

func (o *CheckpointOptions) WithExport(value string) *CheckpointOptions

WithExport

func (*CheckpointOptions) WithIgnoreRootfs

func (o *CheckpointOptions) WithIgnoreRootfs(value bool) *CheckpointOptions

WithIgnoreRootfs

func (*CheckpointOptions) WithKeep

func (o *CheckpointOptions) WithKeep(value bool) *CheckpointOptions

WithKeep

func (*CheckpointOptions) WithLeaveRunning

func (o *CheckpointOptions) WithLeaveRunning(value bool) *CheckpointOptions

WithLeaveRunning

func (*CheckpointOptions) WithTCPEstablished

func (o *CheckpointOptions) WithTCPEstablished(value bool) *CheckpointOptions

WithTCPEstablished

type CommitOptions

type CommitOptions struct {
	Author  *string
	Changes []string
	Comment *string
	Format  *string
	Pause   *bool
	Repo    *string
	Tag     *string
}

CommitOptions describe details about the resulting committed image as defined by repo and tag. None of these options are required.

func (*CommitOptions) Changed

func (o *CommitOptions) Changed(fieldName string) bool

Changed

func (*CommitOptions) GetAuthor

func (o *CommitOptions) GetAuthor() string

GetAuthor

func (*CommitOptions) GetChanges

func (o *CommitOptions) GetChanges() []string

GetChanges

func (*CommitOptions) GetComment

func (o *CommitOptions) GetComment() string

GetComment

func (*CommitOptions) GetFormat

func (o *CommitOptions) GetFormat() string

GetFormat

func (*CommitOptions) GetPause

func (o *CommitOptions) GetPause() bool

GetPause

func (*CommitOptions) GetRepo

func (o *CommitOptions) GetRepo() string

GetRepo

func (*CommitOptions) GetTag

func (o *CommitOptions) GetTag() string

GetTag

func (*CommitOptions) ToParams

func (o *CommitOptions) ToParams() (url.Values, error)

ToParams

func (*CommitOptions) WithAuthor

func (o *CommitOptions) WithAuthor(value string) *CommitOptions

WithAuthor

func (*CommitOptions) WithChanges

func (o *CommitOptions) WithChanges(value []string) *CommitOptions

WithChanges

func (*CommitOptions) WithComment

func (o *CommitOptions) WithComment(value string) *CommitOptions

WithComment

func (*CommitOptions) WithFormat

func (o *CommitOptions) WithFormat(value string) *CommitOptions

WithFormat

func (*CommitOptions) WithPause

func (o *CommitOptions) WithPause(value bool) *CommitOptions

WithPause

func (*CommitOptions) WithRepo

func (o *CommitOptions) WithRepo(value string) *CommitOptions

WithRepo

func (*CommitOptions) WithTag

func (o *CommitOptions) WithTag(value string) *CommitOptions

WithTag

type CreateOptions

type CreateOptions struct{}

CreateOptions are optional options for creating containers

func (*CreateOptions) Changed

func (o *CreateOptions) Changed(fieldName string) bool

Changed

func (*CreateOptions) ToParams

func (o *CreateOptions) ToParams() (url.Values, error)

ToParams

type DiffOptions

type DiffOptions struct{}

DiffOptions are optional options for creating containers

func (*DiffOptions) Changed

func (o *DiffOptions) Changed(fieldName string) bool

Changed

func (*DiffOptions) ToParams

func (o *DiffOptions) ToParams() (url.Values, error)

ToParams

type ExecInspectOptions

type ExecInspectOptions struct{}

ExecInspectOptions are optional options for inspecting exec sessions

func (*ExecInspectOptions) Changed

func (o *ExecInspectOptions) Changed(fieldName string) bool

Changed

func (*ExecInspectOptions) ToParams

func (o *ExecInspectOptions) ToParams() (url.Values, error)

ToParams

type ExecStartAndAttachOptions

type ExecStartAndAttachOptions struct {
	// OutputStream will be attached to container's STDOUT
	OutputStream *io.WriteCloser
	// ErrorStream will be attached to container's STDERR
	ErrorStream *io.WriteCloser
	// InputStream will be attached to container's STDIN
	InputStream *bufio.Reader
	// AttachOutput is whether to attach to STDOUT
	// If false, stdout will not be attached
	AttachOutput *bool
	// AttachError is whether to attach to STDERR
	// If false, stdout will not be attached
	AttachError *bool
	// AttachInput is whether to attach to STDIN
	// If false, stdout will not be attached
	AttachInput *bool
}

ExecStartAndAttachOptions are optional options for resizing container ExecTTYs

func (*ExecStartAndAttachOptions) Changed

func (o *ExecStartAndAttachOptions) Changed(fieldName string) bool

Changed

func (*ExecStartAndAttachOptions) GetAttachError

func (o *ExecStartAndAttachOptions) GetAttachError() bool

GetAttachError

func (*ExecStartAndAttachOptions) GetAttachInput

func (o *ExecStartAndAttachOptions) GetAttachInput() bool

GetAttachInput

func (*ExecStartAndAttachOptions) GetAttachOutput

func (o *ExecStartAndAttachOptions) GetAttachOutput() bool

GetAttachOutput

func (*ExecStartAndAttachOptions) GetErrorStream

func (o *ExecStartAndAttachOptions) GetErrorStream() io.WriteCloser

GetErrorStream

func (*ExecStartAndAttachOptions) GetInputStream

func (o *ExecStartAndAttachOptions) GetInputStream() bufio.Reader

GetInputStream

func (*ExecStartAndAttachOptions) GetOutputStream

func (o *ExecStartAndAttachOptions) GetOutputStream() io.WriteCloser

GetOutputStream

func (*ExecStartAndAttachOptions) ToParams

func (o *ExecStartAndAttachOptions) ToParams() (url.Values, error)

ToParams

func (*ExecStartAndAttachOptions) WithAttachError

func (o *ExecStartAndAttachOptions) WithAttachError(value bool) *ExecStartAndAttachOptions

WithAttachError

func (*ExecStartAndAttachOptions) WithAttachInput

func (o *ExecStartAndAttachOptions) WithAttachInput(value bool) *ExecStartAndAttachOptions

WithAttachInput

func (*ExecStartAndAttachOptions) WithAttachOutput

func (o *ExecStartAndAttachOptions) WithAttachOutput(value bool) *ExecStartAndAttachOptions

WithAttachOutput

func (*ExecStartAndAttachOptions) WithErrorStream

WithErrorStream

func (*ExecStartAndAttachOptions) WithInputStream

WithInputStream

func (*ExecStartAndAttachOptions) WithOutputStream

WithOutputStream

type ExecStartOptions

type ExecStartOptions struct{}

ExecStartOptions are optional options for starting exec sessions

func (*ExecStartOptions) Changed

func (o *ExecStartOptions) Changed(fieldName string) bool

Changed

func (*ExecStartOptions) ToParams

func (o *ExecStartOptions) ToParams() (url.Values, error)

ToParams

type ExistsOptions

type ExistsOptions struct {
	// External checks for containers created outside of Podman
	External *bool
}

ExistsOptions are optional options for checking if a container exists

func (*ExistsOptions) Changed

func (o *ExistsOptions) Changed(fieldName string) bool

Changed

func (*ExistsOptions) GetExternal

func (o *ExistsOptions) GetExternal() bool

GetExternal

func (*ExistsOptions) ToParams

func (o *ExistsOptions) ToParams() (url.Values, error)

ToParams

func (*ExistsOptions) WithExternal

func (o *ExistsOptions) WithExternal(value bool) *ExistsOptions

WithExternal

type ExportOptions

type ExportOptions struct{}

ExportOptions are optional options for exporting containers

func (*ExportOptions) Changed

func (o *ExportOptions) Changed(fieldName string) bool

Changed

func (*ExportOptions) ToParams

func (o *ExportOptions) ToParams() (url.Values, error)

ToParams

type HealthCheckOptions

type HealthCheckOptions struct{}

HealthCheckOptions are optional options for checking the health of a container

func (*HealthCheckOptions) Changed

func (o *HealthCheckOptions) Changed(fieldName string) bool

Changed

func (*HealthCheckOptions) ToParams

func (o *HealthCheckOptions) ToParams() (url.Values, error)

ToParams

type InitOptions

type InitOptions struct{}

InitOptions are optional options for initing containers

func (*InitOptions) Changed

func (o *InitOptions) Changed(fieldName string) bool

Changed

func (*InitOptions) ToParams

func (o *InitOptions) ToParams() (url.Values, error)

ToParams

type InspectOptions

type InspectOptions struct {
	Size *bool
}

InspectOptions are optional options for inspecting containers

func (*InspectOptions) Changed

func (o *InspectOptions) Changed(fieldName string) bool

Changed

func (*InspectOptions) GetSize

func (o *InspectOptions) GetSize() bool

GetSize

func (*InspectOptions) ToParams

func (o *InspectOptions) ToParams() (url.Values, error)

ToParams

func (*InspectOptions) WithSize

func (o *InspectOptions) WithSize(value bool) *InspectOptions

WithSize

type KillOptions

type KillOptions struct {
	Signal *string
}

KillOptions are optional options for killing containers

func (*KillOptions) Changed

func (o *KillOptions) Changed(fieldName string) bool

Changed

func (*KillOptions) GetSignal

func (o *KillOptions) GetSignal() string

GetSignal

func (*KillOptions) ToParams

func (o *KillOptions) ToParams() (url.Values, error)

ToParams

func (*KillOptions) WithSignal

func (o *KillOptions) WithSignal(value string) *KillOptions

WithSignal

type ListOptions

type ListOptions struct {
	All       *bool
	External  *bool
	Filters   map[string][]string
	Last      *int
	Namespace *bool
	Size      *bool
	Sync      *bool
}

ListOptions are optional options for listing containers

func (*ListOptions) Changed

func (o *ListOptions) Changed(fieldName string) bool

Changed

func (*ListOptions) GetAll

func (o *ListOptions) GetAll() bool

GetAll

func (*ListOptions) GetExternal

func (o *ListOptions) GetExternal() bool

GetExternal

func (*ListOptions) GetFilters

func (o *ListOptions) GetFilters() map[string][]string

GetFilters

func (*ListOptions) GetLast

func (o *ListOptions) GetLast() int

GetLast

func (*ListOptions) GetNamespace

func (o *ListOptions) GetNamespace() bool

GetNamespace

func (*ListOptions) GetSize

func (o *ListOptions) GetSize() bool

GetSize

func (*ListOptions) GetSync

func (o *ListOptions) GetSync() bool

GetSync

func (*ListOptions) ToParams

func (o *ListOptions) ToParams() (url.Values, error)

ToParams

func (*ListOptions) WithAll

func (o *ListOptions) WithAll(value bool) *ListOptions

WithAll

func (*ListOptions) WithExternal

func (o *ListOptions) WithExternal(value bool) *ListOptions

WithExternal

func (*ListOptions) WithFilters

func (o *ListOptions) WithFilters(value map[string][]string) *ListOptions

WithFilters

func (*ListOptions) WithLast

func (o *ListOptions) WithLast(value int) *ListOptions

WithLast

func (*ListOptions) WithNamespace

func (o *ListOptions) WithNamespace(value bool) *ListOptions

WithNamespace

func (*ListOptions) WithSize

func (o *ListOptions) WithSize(value bool) *ListOptions

WithSize

func (*ListOptions) WithSync

func (o *ListOptions) WithSync(value bool) *ListOptions

WithSync

type LogOptions

type LogOptions struct {
	Follow     *bool
	Since      *string
	Stderr     *bool
	Stdout     *bool
	Tail       *string
	Timestamps *bool
	Until      *string
}

LogOptions describe finer control of log content or how the content is formatted.

func (*LogOptions) Changed

func (o *LogOptions) Changed(fieldName string) bool

Changed

func (*LogOptions) GetFollow

func (o *LogOptions) GetFollow() bool

GetFollow

func (*LogOptions) GetSince

func (o *LogOptions) GetSince() string

GetSince

func (*LogOptions) GetStderr

func (o *LogOptions) GetStderr() bool

GetStderr

func (*LogOptions) GetStdout

func (o *LogOptions) GetStdout() bool

GetStdout

func (*LogOptions) GetTail

func (o *LogOptions) GetTail() string

GetTail

func (*LogOptions) GetTimestamps

func (o *LogOptions) GetTimestamps() bool

GetTimestamps

func (*LogOptions) GetUntil

func (o *LogOptions) GetUntil() string

GetUntil

func (*LogOptions) ToParams

func (o *LogOptions) ToParams() (url.Values, error)

ToParams

func (*LogOptions) WithFollow

func (o *LogOptions) WithFollow(value bool) *LogOptions

WithFollow

func (*LogOptions) WithSince

func (o *LogOptions) WithSince(value string) *LogOptions

WithSince

func (*LogOptions) WithStderr

func (o *LogOptions) WithStderr(value bool) *LogOptions

WithStderr

func (*LogOptions) WithStdout

func (o *LogOptions) WithStdout(value bool) *LogOptions

WithStdout

func (*LogOptions) WithTail

func (o *LogOptions) WithTail(value string) *LogOptions

WithTail

func (*LogOptions) WithTimestamps

func (o *LogOptions) WithTimestamps(value bool) *LogOptions

WithTimestamps

func (*LogOptions) WithUntil

func (o *LogOptions) WithUntil(value string) *LogOptions

WithUntil

type MountOptions

type MountOptions struct{}

MountOptions are optional options for mounting containers

func (*MountOptions) Changed

func (o *MountOptions) Changed(fieldName string) bool

Changed

func (*MountOptions) ToParams

func (o *MountOptions) ToParams() (url.Values, error)

ToParams

type MountedContainerPathsOptions

type MountedContainerPathsOptions struct{}

MountedContainerPathsOptions are optional options for getting container mount paths

func (*MountedContainerPathsOptions) Changed

func (o *MountedContainerPathsOptions) Changed(fieldName string) bool

Changed

func (*MountedContainerPathsOptions) ToParams

func (o *MountedContainerPathsOptions) ToParams() (url.Values, error)

ToParams

type PauseOptions

type PauseOptions struct{}

PauseOptions are optional options for pausing containers

func (*PauseOptions) Changed

func (o *PauseOptions) Changed(fieldName string) bool

Changed

func (*PauseOptions) ToParams

func (o *PauseOptions) ToParams() (url.Values, error)

ToParams

type PruneOptions

type PruneOptions struct {
	Filters map[string][]string
}

PruneOptions are optional options for pruning containers

func (*PruneOptions) Changed

func (o *PruneOptions) Changed(fieldName string) bool

Changed

func (*PruneOptions) GetFilters

func (o *PruneOptions) GetFilters() map[string][]string

GetFilters

func (*PruneOptions) ToParams

func (o *PruneOptions) ToParams() (url.Values, error)

ToParams

func (*PruneOptions) WithFilters

func (o *PruneOptions) WithFilters(value map[string][]string) *PruneOptions

WithFilters

type RemoveOptions

type RemoveOptions struct {
	Ignore  *bool
	Force   *bool
	Volumes *bool
}

RemoveOptions are optional options for removing containers

func (*RemoveOptions) Changed

func (o *RemoveOptions) Changed(fieldName string) bool

Changed

func (*RemoveOptions) GetForce

func (o *RemoveOptions) GetForce() bool

GetForce

func (*RemoveOptions) GetIgnore

func (o *RemoveOptions) GetIgnore() bool

GetIgnore

func (*RemoveOptions) GetVolumes

func (o *RemoveOptions) GetVolumes() bool

GetVolumes

func (*RemoveOptions) ToParams

func (o *RemoveOptions) ToParams() (url.Values, error)

ToParams

func (*RemoveOptions) WithForce

func (o *RemoveOptions) WithForce(value bool) *RemoveOptions

WithForce

func (*RemoveOptions) WithIgnore

func (o *RemoveOptions) WithIgnore(value bool) *RemoveOptions

WithIgnore

func (*RemoveOptions) WithVolumes

func (o *RemoveOptions) WithVolumes(value bool) *RemoveOptions

WithVolumes

type RenameOptions

type RenameOptions struct {
	Name *string
}

RenameOptions are options for renaming containers. The Name field is required.

func (*RenameOptions) Changed

func (o *RenameOptions) Changed(fieldName string) bool

Changed

func (*RenameOptions) GetName

func (o *RenameOptions) GetName() string

GetName

func (*RenameOptions) ToParams

func (o *RenameOptions) ToParams() (url.Values, error)

ToParams

func (*RenameOptions) WithName

func (o *RenameOptions) WithName(value string) *RenameOptions

WithName

type ResizeExecTTYOptions

type ResizeExecTTYOptions struct {
	Height *int
	Width  *int
}

ResizeExecTTYOptions are optional options for resizing container ExecTTYs

func (*ResizeExecTTYOptions) Changed

func (o *ResizeExecTTYOptions) Changed(fieldName string) bool

Changed

func (*ResizeExecTTYOptions) GetHeight

func (o *ResizeExecTTYOptions) GetHeight() int

GetHeight

func (*ResizeExecTTYOptions) GetWidth

func (o *ResizeExecTTYOptions) GetWidth() int

GetWidth

func (*ResizeExecTTYOptions) ToParams

func (o *ResizeExecTTYOptions) ToParams() (url.Values, error)

ToParams

func (*ResizeExecTTYOptions) WithHeight

func (o *ResizeExecTTYOptions) WithHeight(value int) *ResizeExecTTYOptions

WithHeight

func (*ResizeExecTTYOptions) WithWidth

func (o *ResizeExecTTYOptions) WithWidth(value int) *ResizeExecTTYOptions

WithWidth

type ResizeTTYOptions

type ResizeTTYOptions struct {
	Height  *int
	Width   *int
	Running *bool
}

ResizeTTYOptions are optional options for resizing container TTYs

func (*ResizeTTYOptions) Changed

func (o *ResizeTTYOptions) Changed(fieldName string) bool

Changed

func (*ResizeTTYOptions) GetHeight

func (o *ResizeTTYOptions) GetHeight() int

GetHeight

func (*ResizeTTYOptions) GetRunning added in v3.1.0

func (o *ResizeTTYOptions) GetRunning() bool

GetRunning

func (*ResizeTTYOptions) GetWidth

func (o *ResizeTTYOptions) GetWidth() int

GetWidth

func (*ResizeTTYOptions) ToParams

func (o *ResizeTTYOptions) ToParams() (url.Values, error)

ToParams

func (*ResizeTTYOptions) WithHeight

func (o *ResizeTTYOptions) WithHeight(value int) *ResizeTTYOptions

WithHeight

func (*ResizeTTYOptions) WithRunning added in v3.1.0

func (o *ResizeTTYOptions) WithRunning(value bool) *ResizeTTYOptions

WithRunning

func (*ResizeTTYOptions) WithWidth

func (o *ResizeTTYOptions) WithWidth(value int) *ResizeTTYOptions

WithWidth

type RestartOptions

type RestartOptions struct {
	Timeout *int
}

RestartOptions are optional options for restarting containers

func (*RestartOptions) Changed

func (o *RestartOptions) Changed(fieldName string) bool

Changed

func (*RestartOptions) GetTimeout

func (o *RestartOptions) GetTimeout() int

GetTimeout

func (*RestartOptions) ToParams

func (o *RestartOptions) ToParams() (url.Values, error)

ToParams

func (*RestartOptions) WithTimeout

func (o *RestartOptions) WithTimeout(value int) *RestartOptions

WithTimeout

type RestoreOptions

type RestoreOptions struct {
	IgnoreRootfs    *bool
	IgnoreStaticIP  *bool
	IgnoreStaticMAC *bool
	ImportAchive    *string
	Keep            *bool
	Name            *string
	TCPEstablished  *bool
}

RestoreOptions are optional options for restoring containers

func (*RestoreOptions) Changed

func (o *RestoreOptions) Changed(fieldName string) bool

Changed

func (*RestoreOptions) GetIgnoreRootfs

func (o *RestoreOptions) GetIgnoreRootfs() bool

GetIgnoreRootfs

func (*RestoreOptions) GetIgnoreStaticIP

func (o *RestoreOptions) GetIgnoreStaticIP() bool

GetIgnoreStaticIP

func (*RestoreOptions) GetIgnoreStaticMAC

func (o *RestoreOptions) GetIgnoreStaticMAC() bool

GetIgnoreStaticMAC

func (*RestoreOptions) GetImportAchive

func (o *RestoreOptions) GetImportAchive() string

GetImportAchive

func (*RestoreOptions) GetKeep

func (o *RestoreOptions) GetKeep() bool

GetKeep

func (*RestoreOptions) GetName

func (o *RestoreOptions) GetName() string

GetName

func (*RestoreOptions) GetTCPEstablished

func (o *RestoreOptions) GetTCPEstablished() bool

GetTCPEstablished

func (*RestoreOptions) ToParams

func (o *RestoreOptions) ToParams() (url.Values, error)

ToParams

func (*RestoreOptions) WithIgnoreRootfs

func (o *RestoreOptions) WithIgnoreRootfs(value bool) *RestoreOptions

WithIgnoreRootfs

func (*RestoreOptions) WithIgnoreStaticIP

func (o *RestoreOptions) WithIgnoreStaticIP(value bool) *RestoreOptions

WithIgnoreStaticIP

func (*RestoreOptions) WithIgnoreStaticMAC

func (o *RestoreOptions) WithIgnoreStaticMAC(value bool) *RestoreOptions

WithIgnoreStaticMAC

func (*RestoreOptions) WithImportAchive

func (o *RestoreOptions) WithImportAchive(value string) *RestoreOptions

WithImportAchive

func (*RestoreOptions) WithKeep

func (o *RestoreOptions) WithKeep(value bool) *RestoreOptions

WithKeep

func (*RestoreOptions) WithName

func (o *RestoreOptions) WithName(value string) *RestoreOptions

WithName

func (*RestoreOptions) WithTCPEstablished

func (o *RestoreOptions) WithTCPEstablished(value bool) *RestoreOptions

WithTCPEstablished

type ShouldRestartOptions

type ShouldRestartOptions struct{}

ShouldRestartOptions

func (*ShouldRestartOptions) Changed

func (o *ShouldRestartOptions) Changed(fieldName string) bool

Changed

func (*ShouldRestartOptions) ToParams

func (o *ShouldRestartOptions) ToParams() (url.Values, error)

ToParams

type StartOptions

type StartOptions struct {
	DetachKeys *string
}

StartOptions are optional options for starting containers

func (*StartOptions) Changed

func (o *StartOptions) Changed(fieldName string) bool

Changed

func (*StartOptions) GetDetachKeys

func (o *StartOptions) GetDetachKeys() string

GetDetachKeys

func (*StartOptions) ToParams

func (o *StartOptions) ToParams() (url.Values, error)

ToParams

func (*StartOptions) WithDetachKeys

func (o *StartOptions) WithDetachKeys(value string) *StartOptions

WithDetachKeys

type StatsOptions

type StatsOptions struct {
	Stream *bool
}

StatsOptions are optional options for getting stats on containers

func (*StatsOptions) Changed

func (o *StatsOptions) Changed(fieldName string) bool

Changed

func (*StatsOptions) GetStream

func (o *StatsOptions) GetStream() bool

GetStream

func (*StatsOptions) ToParams

func (o *StatsOptions) ToParams() (url.Values, error)

ToParams

func (*StatsOptions) WithStream

func (o *StatsOptions) WithStream(value bool) *StatsOptions

WithStream

type StopOptions

type StopOptions struct {
	Ignore  *bool
	Timeout *uint
}

StopOptions are optional options for stopping containers

func (*StopOptions) Changed

func (o *StopOptions) Changed(fieldName string) bool

Changed

func (*StopOptions) GetIgnore

func (o *StopOptions) GetIgnore() bool

GetIgnore

func (*StopOptions) GetTimeout

func (o *StopOptions) GetTimeout() uint

GetTimeout

func (*StopOptions) ToParams

func (o *StopOptions) ToParams() (url.Values, error)

ToParams

func (*StopOptions) WithIgnore

func (o *StopOptions) WithIgnore(value bool) *StopOptions

WithIgnore

func (*StopOptions) WithTimeout

func (o *StopOptions) WithTimeout(value uint) *StopOptions

WithTimeout

type TopOptions

type TopOptions struct {
	Descriptors *[]string
}

TopOptions are optional options for getting running processes in containers

func (*TopOptions) Changed

func (o *TopOptions) Changed(fieldName string) bool

Changed

func (*TopOptions) GetDescriptors

func (o *TopOptions) GetDescriptors() []string

GetDescriptors

func (*TopOptions) ToParams

func (o *TopOptions) ToParams() (url.Values, error)

ToParams

func (*TopOptions) WithDescriptors

func (o *TopOptions) WithDescriptors(value []string) *TopOptions

WithDescriptors

type UnmountOptions

type UnmountOptions struct{}

UnmountOptions are optional options for unmounting containers

func (*UnmountOptions) Changed

func (o *UnmountOptions) Changed(fieldName string) bool

Changed

func (*UnmountOptions) ToParams

func (o *UnmountOptions) ToParams() (url.Values, error)

ToParams

type UnpauseOptions

type UnpauseOptions struct{}

UnpauseOptions are optional options for unpausing containers

func (*UnpauseOptions) Changed

func (o *UnpauseOptions) Changed(fieldName string) bool

Changed

func (*UnpauseOptions) ToParams

func (o *UnpauseOptions) ToParams() (url.Values, error)

ToParams

type WaitOptions

type WaitOptions struct {
	Condition []define.ContainerStatus
	Interval  *string
}

WaitOptions are optional options for waiting on containers

func (*WaitOptions) Changed

func (o *WaitOptions) Changed(fieldName string) bool

Changed

func (*WaitOptions) GetCondition

func (o *WaitOptions) GetCondition() []define.ContainerStatus

GetCondition

func (*WaitOptions) GetInterval

func (o *WaitOptions) GetInterval() string

GetInterval

func (*WaitOptions) ToParams

func (o *WaitOptions) ToParams() (url.Values, error)

ToParams

func (*WaitOptions) WithCondition

func (o *WaitOptions) WithCondition(value []define.ContainerStatus) *WaitOptions

WithCondition

func (*WaitOptions) WithInterval

func (o *WaitOptions) WithInterval(value string) *WaitOptions

WithInterval

Jump to

Keyboard shortcuts

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