Documentation ¶
Index ¶
- func Checkpoint(ctx context.Context, nameOrId string, ...) (*entities.CheckpointReport, error)
- func Commit(ctx context.Context, nameOrId string, options CommitOptions) (handlers.IDResponse, error)
- func ContainerInit(ctx context.Context, nameOrID string) error
- func CreateWithSpec(ctx context.Context, s *specgen.SpecGenerator) (utils.ContainerCreateResponse, error)
- func Diff(ctx context.Context, nameOrId string) ([]archive.Change, error)
- func ExecCreate(ctx context.Context, nameOrID string, config *handlers.ExecCreateConfig) (string, error)
- func ExecInspect(ctx context.Context, sessionID string) (*define.InspectExecSession, error)
- func Exists(ctx context.Context, nameOrID string) (bool, error)
- func Export(ctx context.Context, nameOrID string, w io.Writer) error
- func GetMountedContainerPaths(ctx context.Context) (map[string]string, error)
- func Inspect(ctx context.Context, nameOrID string, size *bool) (*define.InspectContainerData, error)
- func Kill(ctx context.Context, nameOrID string, sig string) error
- func List(ctx context.Context, filters map[string][]string, all *bool, last *int, ...) ([]entities.ListContainer, error)
- func Logs(ctx context.Context, nameOrID string, opts LogOptions, ...) error
- func Mount(ctx context.Context, nameOrID string) (string, error)
- func Pause(ctx context.Context, nameOrID string) error
- func Prune(ctx context.Context, filters map[string][]string) ([]string, error)
- func Remove(ctx context.Context, nameOrID string, force, volumes *bool) error
- func Restart(ctx context.Context, nameOrID string, timeout *int) error
- func Restore(ctx context.Context, nameOrId string, ...) (*entities.RestoreReport, error)
- func RunHealthCheck(ctx context.Context, nameOrID string) (*define.HealthCheckResults, error)
- func Start(ctx context.Context, nameOrID string, detachKeys *string) error
- func Stats()
- func Stop(ctx context.Context, nameOrID string, timeout *uint) error
- func Top(ctx context.Context, nameOrID string, descriptors []string) ([]string, error)
- func Unmount(ctx context.Context, nameOrID string) error
- func Unpause(ctx context.Context, nameOrID string) error
- func Wait(ctx context.Context, nameOrID string, condition *define.ContainerStatus) (int32, error)
- type CommitOptions
- type LogOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Checkpoint ¶ added in v1.9.0
func Checkpoint(ctx context.Context, nameOrId string, keep, leaveRunning, tcpEstablished, ignoreRootFS *bool, export *string) (*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 ¶ added in v1.9.0
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 ¶ added in v1.9.0
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 CreateWithSpec ¶ added in v1.8.1
func CreateWithSpec(ctx context.Context, s *specgen.SpecGenerator) (utils.ContainerCreateResponse, error)
func ExecCreate ¶ added in v1.9.0
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 ¶ added in v1.9.0
ExecInspect inspects an existing exec session, returning detailed information about it.
func Exists ¶
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 ¶ added in v1.9.0
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 ¶
GetMountedContainerPaths returns a map of mounted containers and their mount locations.
func Inspect ¶
func Inspect(ctx context.Context, nameOrID string, size *bool) (*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 ¶
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, filters map[string][]string, all *bool, last *int, pod, size, sync *bool) ([]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, opts 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 ¶
Mount mounts an existing container to the filesystem. It returns the path of the mounted container in string format.
func Pause ¶
Pause pauses a given container. The nameOrID can be a container name or a partial/full ID.
func Prune ¶
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 ¶
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.
func Restart ¶
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 ¶ added in v1.9.0
func Restore(ctx context.Context, nameOrId string, keep, tcpEstablished, ignoreRootFS, ignoreStaticIP, ignoreStaticMAC *bool, name, importArchive *string) (*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 processs.
func RunHealthCheck ¶
RunHealthCheck executes the container's healthcheck and returns the health status of the container.
func Start ¶
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 Stop ¶
Stop stops a running container. The timeout is optional. The nameOrID can be a container name or a partial/full ID
func Top ¶
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 ¶
Unmount unmounts a container from the filesystem. The container must not be running or the unmount will fail.
func Unpause ¶
Unpause resumes the given paused container. The nameOrID can be a container name or a partial/full ID.