Documentation
¶
Overview ¶
Package backend includes types to send information to server backends.
Index ¶
- type CheckpointDeleteOptions
- type CheckpointListOptions
- type CommitConfig
- type ContainerAttachConfig
- type ContainerCreateConfig
- type ContainerDiskUsage
- type ContainerInspectOptions
- type ContainerListOptions
- type ContainerLogsOptions
- type ContainerRmConfig
- type ContainerStatsConfig
- type ContainerStopOptions
- type CreateImageConfig
- type DiskUsage
- type DiskUsageOptions
- type ExecStartConfig
- type ImageDiskUsage
- type LogAttr
- type LogMessage
- type LogSelector
- type NetworkListConfig
- type PartialLogMetaData
- type PluginCreateConfig
- type PluginDisableConfig
- type PluginEnableConfig
- type PluginRmConfig
- type VolumeDiskUsage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckpointDeleteOptions ¶
CheckpointDeleteOptions holds parameters to delete a checkpoint from a container.
type CheckpointListOptions ¶
type CheckpointListOptions struct {
CheckpointDir string
}
CheckpointListOptions holds parameters to list checkpoints for a container.
type CommitConfig ¶
type CommitConfig struct {
Author string
Comment string
Config *container.Config // TODO(thaJeztah); change this to [dockerspec.DockerOCIImageConfig]
ContainerConfig *container.Config
ContainerID string
ContainerMountLabel string
ContainerOS string
ParentImageID string
}
CommitConfig is the configuration for creating an image as part of a build.
type ContainerAttachConfig ¶
type ContainerAttachConfig struct {
GetStreams func(multiplexed bool, cancel func()) (io.ReadCloser, io.Writer, io.Writer, error)
UseStdin bool
UseStdout bool
UseStderr bool
Logs bool
Stream bool
DetachKeys string
// Used to signify that streams must be multiplexed by producer as endpoint can't manage multiple streams.
// This is typically set by HTTP endpoint, while websocket can transport raw streams
MuxStreams bool
}
ContainerAttachConfig holds the streams to use when connecting to a container to view logs.
type ContainerCreateConfig ¶
type ContainerCreateConfig struct {
Name string
Config *container.Config
HostConfig *container.HostConfig
NetworkingConfig *network.NetworkingConfig
Platform *ocispec.Platform
DefaultReadOnlyNonRecursive bool
}
ContainerCreateConfig is the parameter set to ContainerCreate()
type ContainerDiskUsage ¶
ContainerDiskUsage contains disk usage for containers.
type ContainerInspectOptions ¶
type ContainerInspectOptions struct {
// Size controls whether to propagate the container's size fields.
Size bool
}
ContainerInspectOptions defines options for the backend.ContainerInspect call.
type ContainerListOptions ¶
type ContainerListOptions struct {
Size bool
All bool
Latest bool
Since string
Before string
Limit int
Filters filters.Args
}
ContainerListOptions holds parameters to list containers with.
type ContainerLogsOptions ¶
type ContainerLogsOptions struct {
ShowStdout bool
ShowStderr bool
Since string
Until string
Timestamps bool
Follow bool
Tail string
Details bool
}
ContainerLogsOptions holds parameters to filter logs with.
type ContainerRmConfig ¶
type ContainerRmConfig struct {
ForceRemove, RemoveVolume, RemoveLink bool
}
ContainerRmConfig holds arguments for the container remove operation. This struct is used to tell the backend what operations to perform.
type ContainerStatsConfig ¶
ContainerStatsConfig holds information for configuring the runtime behavior of a backend.ContainerStats() call.
type ContainerStopOptions ¶
type ContainerStopOptions struct {
// Signal (optional) is the signal to send to the container to (gracefully)
// stop it before forcibly terminating the container with SIGKILL after the
// timeout expires. If not value is set, the default (SIGTERM) is used.
Signal string `json:",omitempty"`
// Timeout (optional) is the timeout (in seconds) to wait for the container
// to stop gracefully before forcibly terminating it with SIGKILL.
//
// - Use nil to use the default timeout (10 seconds).
// - Use '-1' to wait indefinitely.
// - Use '0' to not wait for the container to exit gracefully, and
// immediately proceeds to forcibly terminating the container.
// - Other positive values are used as timeout (in seconds).
Timeout *int `json:",omitempty"`
}
ContainerStopOptions holds the options to stop or restart a container.
type CreateImageConfig ¶
type CreateImageConfig struct {
Tag reference.NamedTagged
NoPause bool
Author string
Comment string
Config *container.Config
Changes []string
}
CreateImageConfig is the configuration for creating an image from a container.
type DiskUsage ¶
type DiskUsage struct {
Images *ImageDiskUsage
Containers *ContainerDiskUsage
Volumes *VolumeDiskUsage
BuildCache *build.DiskUsage
}
DiskUsage contains the information returned by the backend for the GET "/system/df" endpoint.
type DiskUsageOptions ¶
type DiskUsageOptions struct {
// Containers controls whether container disk usage should be computed.
Containers bool
// Images controls whether image disk usage should be computed.
Images bool
// Volumes controls whether volume disk usage should be computed.
Volumes bool
// Verbose indicates whether to include detailed information.
Verbose bool
}
DiskUsageOptions holds parameters for system disk usage query.
type ExecStartConfig ¶
type ExecStartConfig struct {
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
ConsoleSize *[2]uint `json:",omitempty"`
}
ExecStartConfig holds the options to start container's exec.
type ImageDiskUsage ¶
ImageDiskUsage contains disk usage for images.
type LogMessage ¶
type LogMessage struct {
Line []byte
Source string
Timestamp time.Time
Attrs []LogAttr
PLogMetaData *PartialLogMetaData
// Err is an error associated with a message. Completeness of a message
// with Err is not expected, tho it may be partially complete (fields may
// be missing, gibberish, or nil)
Err error
}
LogMessage is datastructure that represents piece of output produced by some container. The Line member is a slice of an array whose contents can be changed after a log driver's Log() method returns.
type LogSelector ¶
LogSelector is a list of services and tasks that should be returned as part of a log stream. It is similar to swarmapi.LogSelector, with the difference that the names don't have to be resolved to IDs; this is mostly to avoid accidents later where a swarmapi LogSelector might have been incorrectly used verbatim (and to avoid the handler having to import swarmapi types)
type NetworkListConfig ¶
NetworkListConfig stores the options available for listing networks
type PartialLogMetaData ¶
type PartialLogMetaData struct {
Last bool // true if this message is last of a partial
ID string // identifies group of messages comprising a single record
Ordinal int // ordering of message in partial group
}
PartialLogMetaData provides meta data for a partial log message. Messages exceeding a predefined size are split into chunks with this metadata. The expectation is for the logger endpoints to assemble the chunks using this metadata.
type PluginCreateConfig ¶
type PluginCreateConfig struct {
RepoName string
}
PluginCreateConfig hold all options to plugin create.
type PluginDisableConfig ¶
type PluginDisableConfig struct {
ForceDisable bool
}
PluginDisableConfig holds arguments for plugin disable.
type PluginEnableConfig ¶
type PluginEnableConfig struct {
Timeout int
}
PluginEnableConfig holds arguments for plugin enable
type PluginRmConfig ¶
type PluginRmConfig struct {
ForceRemove bool
}
PluginRmConfig holds arguments for plugin remove.
type VolumeDiskUsage ¶
VolumeDiskUsage contains disk usage for volumes.