Documentation
¶
Overview ¶
Package domain contains SDK-agnostic domain models for Docker operations. These types are designed to be independent of any specific Docker client implementation.
Index ¶
- Constants
- Variables
- func IsCanceled(err error) bool
- func IsConflict(err error) bool
- func IsNotFound(err error) bool
- func IsTimeout(err error) bool
- type AuthConfig
- type AuthConfigurations
- type BindOptions
- type ClusterInfo
- type ComponentVersion
- type Container
- type ContainerConfig
- type ContainerNotFoundError
- type ContainerSpec
- type ContainerState
- type ContainerStatus
- type ContainerSummary
- type DiskUsage
- type Driver
- type EndpointIPAMConfig
- type EndpointResource
- type EndpointSettings
- type EndpointSpec
- type Event
- type EventActor
- type EventFilter
- type ExecConfig
- type ExecInspect
- type ExecNotFoundError
- type ExecProcessConfig
- type ExecStartOptions
- type GlobalService
- type Health
- type HealthCheckResult
- type HijackedResponse
- type HostConfig
- type IPAM
- type IPAMConfig
- type Image
- type ImageListOptions
- type ImageNotFoundError
- type ImageSummary
- type ListOptions
- type LocalNodeState
- type LogConfig
- type LogDriver
- type LogOptions
- type LogsReader
- type Mount
- type MountType
- type Network
- type NetworkAttachment
- type NetworkConfig
- type NetworkConnectOptions
- type NetworkListOptions
- type NetworkNotFoundError
- type ParsedReference
- type Peer
- type PingResponse
- type Placement
- type PlacementPreference
- type Platform
- type Port
- type PortBinding
- type PortConfig
- type PortMap
- type PortProtocol
- type PortPublishMode
- type ProgressDetail
- type PullOptions
- type PullProgress
- type PullReader
- type RemoveOptions
- type ReplicatedService
- type ResolutionMode
- type ResourceRequirements
- type Resources
- type RestartCondition
- type RestartPolicy
- type Runtime
- type Service
- type ServiceCreateOptions
- type ServiceEndpoint
- type ServiceListOptions
- type ServiceMeta
- type ServiceMode
- type ServiceMount
- type ServiceNotFoundError
- type ServiceRemoveOptions
- type ServiceRestartPolicy
- type ServiceSpec
- type ServiceVersion
- type SpreadOver
- type SwarmInfo
- type SystemInfo
- type Task
- type TaskListOptions
- type TaskSpec
- type TaskState
- type TaskStatus
- type TmpfsOptions
- type Ulimit
- type Version
- type VolumeOptions
- type VolumeSummary
- type VolumeUsageData
- type WaitError
- type WaitResponse
Constants ¶
const ( EventTypeContainer = "container" EventTypeImage = "image" EventTypeVolume = "volume" EventTypeNetwork = "network" EventTypeDaemon = "daemon" EventTypePlugin = "plugin" EventTypeService = "service" EventTypeNode = "node" EventTypeSecret = "secret" EventTypeConfig = "config" )
Common event types.
const ( EventActionCreate = "create" EventActionStart = "start" EventActionStop = "stop" EventActionDie = "die" EventActionKill = "kill" EventActionPause = "pause" EventActionUnpause = "unpause" EventActionRestart = "restart" EventActionOOM = "oom" EventActionDestroy = "destroy" EventActionRename = "rename" EventActionUpdate = "update" EventActionHealthStatus = "health_status" EventActionExecCreate = "exec_create" EventActionExecStart = "exec_start" EventActionExecDie = "exec_die" EventActionAttach = "attach" EventActionDetach = "detach" EventActionCommit = "commit" EventActionCopy = "copy" EventActionArchivePath = "archive-path" EventActionExtractToDir = "extract-to-dir" EventActionExport = "export" EventActionTop = "top" EventActionResize = "resize" // Image events EventActionPull = "pull" EventActionPush = "push" EventActionTag = "tag" EventActionUntag = "untag" EventActionDelete = "delete" EventActionImport = "import" EventActionSave = "save" EventActionLoad = "load" // Volume events EventActionMount = "mount" EventActionUnmount = "unmount" // Network events EventActionConnect = "connect" EventActionDisconnect = "disconnect" EventActionRemove = "remove" )
Common event actions.
Variables ¶
var ( // ErrNotFound indicates a resource was not found. ErrNotFound = errors.New("resource not found") // ErrConflict indicates a resource conflict (e.g., name already exists). ErrConflict = errors.New("resource conflict") ErrUnauthorized = errors.New("unauthorized") // ErrForbidden indicates permission denied. ErrForbidden = errors.New("forbidden") // ErrTimeout indicates an operation timed out. ErrTimeout = errors.New("operation timed out") // ErrCanceled indicates an operation was canceled. ErrCanceled = errors.New("operation canceled") // ErrConnectionFailed indicates a connection failure. ErrConnectionFailed = errors.New("connection failed") // ErrMaxTimeRunning indicates a job exceeded its maximum runtime. ErrMaxTimeRunning = errors.New("maximum time running exceeded") )
Common domain errors.
Functions ¶
func IsCanceled ¶
IsCanceled returns true if the error indicates cancellation.
func IsConflict ¶
IsConflict returns true if the error indicates a resource conflict.
func IsNotFound ¶
IsNotFound returns true if the error indicates a resource was not found.
Types ¶
type AuthConfig ¶
type AuthConfig struct {
Username string
Password string
Auth string // Base64 encoded "username:password"
Email string
ServerAddress string
IdentityToken string
RegistryToken string
}
AuthConfig contains authorization information for connecting to a registry.
type AuthConfigurations ¶
type AuthConfigurations struct {
Configs map[string]AuthConfig
}
AuthConfigurations contains a map of registry addresses to auth configs.
type BindOptions ¶
type BindOptions struct {
Propagation string // "private", "rprivate", "shared", "rshared", "slave", "rslave"
}
BindOptions represents options for bind mounts.
type ClusterInfo ¶
type ClusterInfo struct {
ID string
Version ServiceVersion
CreatedAt time.Time
UpdatedAt time.Time
RootRotationInProgress bool
}
ClusterInfo represents information about the Swarm cluster.
type ComponentVersion ¶
ComponentVersion represents version info for a component.
type Container ¶
type Container struct {
ID string
Name string
Image string
State ContainerState
Created time.Time
Labels map[string]string
Mounts []Mount
Config *ContainerConfig
}
Container represents a Docker container.
type ContainerConfig ¶
type ContainerConfig struct {
// Basic configuration
Image string
Cmd []string
Entrypoint []string
Env []string
WorkingDir string
User string
Labels map[string]string
Hostname string
AttachStdin bool
AttachStdout bool
AttachStderr bool
Tty bool
OpenStdin bool
StdinOnce bool
// Host configuration
HostConfig *HostConfig
// Networking configuration
NetworkConfig *NetworkConfig
// Container name (optional)
Name string
}
ContainerConfig represents the configuration for creating a container.
type ContainerNotFoundError ¶
type ContainerNotFoundError struct {
ID string
}
ContainerNotFoundError indicates a container was not found.
func (*ContainerNotFoundError) Error ¶
func (e *ContainerNotFoundError) Error() string
func (*ContainerNotFoundError) Is ¶
func (e *ContainerNotFoundError) Is(target error) bool
Is implements error matching.
type ContainerSpec ¶
type ContainerSpec struct {
Image string
Labels map[string]string
Command []string
Args []string
Hostname string
Env []string
Dir string
User string
Mounts []ServiceMount
TTY bool
OpenStdin bool
}
ContainerSpec represents the container specification for a service.
type ContainerState ¶
type ContainerState struct {
Running bool
Paused bool
Restarting bool
OOMKilled bool
Dead bool
Pid int
ExitCode int
Error string
StartedAt time.Time
FinishedAt time.Time
Health *Health
}
ContainerState represents the state of a container.
type ContainerStatus ¶
ContainerStatus represents the container status within a task.
type ContainerSummary ¶
type ContainerSummary struct {
ID string
Names []string
Image string
ImageID string
Command string
Created int64
State string
Status string
SizeRw int64
SizeRootFs int64
}
ContainerSummary represents a container summary for disk usage.
type DiskUsage ¶
type DiskUsage struct {
LayersSize int64
Images []ImageSummary
Containers []ContainerSummary
Volumes []VolumeSummary
}
DiskUsage represents disk usage information.
type EndpointIPAMConfig ¶
EndpointIPAMConfig represents IPAM settings for an endpoint.
type EndpointResource ¶
type EndpointResource struct {
Name string
EndpointID string
MacAddress string
IPv4Address string
IPv6Address string
}
EndpointResource contains network endpoint resources.
type EndpointSettings ¶
type EndpointSettings struct {
IPAMConfig *EndpointIPAMConfig
Links []string
Aliases []string
NetworkID string
EndpointID string
Gateway string
IPAddress string
IPPrefixLen int
IPv6Gateway string
GlobalIPv6Address string
GlobalIPv6PrefixLen int
MacAddress string
DriverOpts map[string]string
}
EndpointSettings represents the settings for a network endpoint.
type EndpointSpec ¶
type EndpointSpec struct {
Mode ResolutionMode
Ports []PortConfig
}
EndpointSpec represents the endpoint specification for a service.
type Event ¶
type Event struct {
// Type of event (container, image, volume, network, daemon, plugin, service, node, secret, config)
Type string
// Action that triggered the event (create, start, stop, die, kill, etc.)
Action string
// Actor that triggered the event
Actor EventActor
// Scope of the event (local, swarm)
Scope string
// Time when the event occurred
Time time.Time
// TimeNano is the time in nanoseconds
TimeNano int64
}
Event represents a Docker event.
func (*Event) GetContainerID ¶
GetContainerID returns the container ID from the event, if applicable.
func (*Event) IsContainerStopEvent ¶
IsContainerStopEvent returns true if the event indicates a container has stopped.
type EventActor ¶
type EventActor struct {
// ID of the object
ID string
// Attributes contain key-value pairs with additional info about the object
Attributes map[string]string
}
EventActor contains information about the object that triggered the event.
type EventFilter ¶
type EventFilter struct {
// Since filters events after this time
Since time.Time
// Until filters events before this time
Until time.Time
// Filters is a map of filter types to filter values
// Keys: container, event, image, label, network, type, volume, daemon, service, node, scope
Filters map[string][]string
}
EventFilter represents filters for subscribing to events.
type ExecConfig ¶
type ExecConfig struct {
// Command to run
Cmd []string
// Environment variables
Env []string
// Working directory
WorkingDir string
// User to run the command as
User string
// Attach streams
AttachStdin bool
AttachStdout bool
AttachStderr bool
// Allocate pseudo-TTY
Tty bool
// Detach from the exec after starting
Detach bool
// Privileged mode
Privileged bool
}
ExecConfig represents the configuration for creating an exec instance.
type ExecInspect ¶
type ExecInspect struct {
ID string
ContainerID string
Running bool
ExitCode int
Pid int
ProcessConfig *ExecProcessConfig
}
ExecInspect represents the result of inspecting an exec instance.
type ExecNotFoundError ¶
type ExecNotFoundError struct {
ID string
}
ExecNotFoundError indicates an exec instance was not found.
func (*ExecNotFoundError) Error ¶
func (e *ExecNotFoundError) Error() string
func (*ExecNotFoundError) Is ¶
func (e *ExecNotFoundError) Is(target error) bool
Is implements error matching.
type ExecProcessConfig ¶
type ExecProcessConfig struct {
User string
Privileged bool
Tty bool
Entrypoint string
Arguments []string
}
ExecProcessConfig represents the process configuration for an exec instance.
type ExecStartOptions ¶
type ExecStartOptions struct {
Detach bool
Tty bool
// Stdin to attach (optional)
Stdin io.Reader
// Output streams
OutputStream io.Writer
ErrorStream io.Writer
}
ExecStartOptions represents options for starting an exec instance.
type Health ¶
type Health struct {
Status string // "healthy", "unhealthy", "starting", "none"
FailingStreak int
Log []HealthCheckResult
}
Health represents container health check status.
type HealthCheckResult ¶
HealthCheckResult represents a single health check result.
type HijackedResponse ¶
HijackedResponse represents a hijacked connection for exec.
func (*HijackedResponse) Close ¶
func (h *HijackedResponse) Close() error
Close closes the hijacked connection.
type HostConfig ¶
type HostConfig struct {
// Resource limits
Memory int64 // Memory limit in bytes
MemorySwap int64 // Total memory limit (memory + swap)
CPUPeriod int64 // CPU CFS period
CPUQuota int64 // CPU CFS quota
NanoCPUs int64 // CPU limit in units of 10^-9 CPUs
// Binds and mounts
Binds []string // Volume bindings in format "host:container[:options]"
VolumesFrom []string // Volumes from other containers in format "container[:ro|rw]"
Mounts []Mount // Mount configurations
// Networking
NetworkMode string // Network mode (bridge, host, none, container:<name|id>)
PortBindings PortMap // Port mappings
DNS []string // DNS servers
DNSSearch []string // DNS search domains
ExtraHosts []string // Extra hosts in format "hostname:IP"
// Security
Privileged bool // Run in privileged mode
CapAdd []string // Capabilities to add
CapDrop []string // Capabilities to drop
SecurityOpt []string // Security options
ReadonlyRootfs bool // Mount root filesystem as read-only
// Runtime
AutoRemove bool // Automatically remove container when it exits
RestartPolicy RestartPolicy // Restart policy
// Logging
LogConfig LogConfig // Logging configuration
// Other
PidMode string // PID namespace mode
UsernsMode string // User namespace mode
ShmSize int64 // Size of /dev/shm in bytes
Tmpfs map[string]string // Tmpfs mounts
Ulimits []Ulimit // Ulimit settings
}
HostConfig contains the host-specific configuration for a container.
type IPAM ¶
type IPAM struct {
Driver string
Options map[string]string
Config []IPAMConfig
}
IPAM represents IP Address Management configuration.
type IPAMConfig ¶
IPAMConfig represents IPAM configuration for a network.
type Image ¶
type Image struct {
ID string
RepoTags []string
RepoDigests []string
Comment string
Created time.Time
Size int64
Labels map[string]string
}
Image represents a Docker image.
type ImageListOptions ¶
type ImageListOptions struct {
All bool // Show all images (default hides intermediate)
Filters map[string][]string // Filters to apply
}
ImageListOptions represents options for listing images.
type ImageNotFoundError ¶
type ImageNotFoundError struct {
Image string
}
ImageNotFoundError indicates an image was not found.
func (*ImageNotFoundError) Error ¶
func (e *ImageNotFoundError) Error() string
func (*ImageNotFoundError) Is ¶
func (e *ImageNotFoundError) Is(target error) bool
Is implements error matching.
type ImageSummary ¶
type ImageSummary struct {
ID string
ParentID string
RepoTags []string
RepoDigests []string
Created int64
Size int64
Labels map[string]string
Containers int64
}
ImageSummary represents a summary of an image for list operations.
type ListOptions ¶
type ListOptions struct {
All bool // Show all containers (default shows just running)
Size bool // Show size
Limit int // Max number of containers to return
Filters map[string][]string // Filters to apply
}
ListOptions represents options for listing containers.
type LocalNodeState ¶
type LocalNodeState string
LocalNodeState represents the state of the local Swarm node.
const ( LocalNodeStateInactive LocalNodeState = "inactive" LocalNodeStatePending LocalNodeState = "pending" LocalNodeStateActive LocalNodeState = "active" LocalNodeStateError LocalNodeState = "error" LocalNodeStateLocked LocalNodeState = "locked" )
type LogConfig ¶
type LogConfig struct {
Type string // Logging driver type (json-file, syslog, etc.)
Config map[string]string // Driver-specific options
}
LogConfig represents logging configuration for a container.
type LogOptions ¶
type LogOptions struct {
ShowStdout bool
ShowStderr bool
Since string // Show logs since timestamp or relative time
Until string // Show logs until timestamp or relative time
Timestamps bool // Add timestamps to output
Follow bool // Follow log output
Tail string // Number of lines to show from the end
Details bool // Show extra details
}
LogOptions represents options for retrieving container logs.
type LogsReader ¶
type LogsReader interface {
io.ReadCloser
}
LogsReader provides methods to read container logs.
type Mount ¶
type Mount struct {
Type MountType
Source string
Target string
ReadOnly bool
Consistency string
BindOptions *BindOptions
VolumeOptions *VolumeOptions
TmpfsOptions *TmpfsOptions
}
Mount represents a mount configuration.
type Network ¶
type Network struct {
Name string
ID string
Created time.Time
Scope string // local, global, swarm
Driver string
EnableIPv6 bool
IPAM IPAM
Internal bool
Attachable bool
Ingress bool
Containers map[string]EndpointResource
Options map[string]string
Labels map[string]string
}
Network represents a Docker network.
type NetworkAttachment ¶
NetworkAttachment represents a network attachment for a service.
type NetworkConfig ¶
type NetworkConfig struct {
EndpointsConfig map[string]*EndpointSettings
}
NetworkConfig contains networking configuration for a container.
type NetworkConnectOptions ¶
type NetworkConnectOptions struct {
Container string
EndpointConfig *EndpointSettings
}
NetworkConnectOptions represents options for connecting a container to a network.
type NetworkListOptions ¶
NetworkListOptions represents options for listing networks.
type NetworkNotFoundError ¶
type NetworkNotFoundError struct {
Network string
}
NetworkNotFoundError indicates a network was not found.
func (*NetworkNotFoundError) Error ¶
func (e *NetworkNotFoundError) Error() string
func (*NetworkNotFoundError) Is ¶
func (e *NetworkNotFoundError) Is(target error) bool
Is implements error matching.
type ParsedReference ¶
ParsedReference represents a parsed image reference.
func ParseRepositoryTag ¶
func ParseRepositoryTag(repoTag string) ParsedReference
ParseRepositoryTag parses a repository:tag string into its components.
type PingResponse ¶
type PingResponse struct {
APIVersion string
OSType string
Experimental bool
BuilderVersion string
}
PingResponse represents the response from a ping.
type Placement ¶
type Placement struct {
Constraints []string
Preferences []PlacementPreference
}
Placement represents placement constraints.
type PlacementPreference ¶
type PlacementPreference struct {
Spread *SpreadOver
}
PlacementPreference represents a placement preference.
type PortBinding ¶
PortBinding represents a port binding.
type PortConfig ¶
type PortConfig struct {
Name string
Protocol PortProtocol
TargetPort uint32
PublishedPort uint32
PublishMode PortPublishMode
}
PortConfig represents a port configuration for a service.
type PortProtocol ¶
type PortProtocol string
PortProtocol represents the protocol for a port.
const ( PortProtocolTCP PortProtocol = "tcp" PortProtocolUDP PortProtocol = "udp" PortProtocolSCTP PortProtocol = "sctp" )
type PortPublishMode ¶
type PortPublishMode string
PortPublishMode represents how a port is published.
const ( PortPublishModeIngress PortPublishMode = "ingress" PortPublishModeHost PortPublishMode = "host" )
type ProgressDetail ¶
ProgressDetail represents detailed progress information.
type PullOptions ¶
type PullOptions struct {
// Repository to pull (e.g., "alpine", "nginx:latest")
Repository string
// Tag to pull (if not included in repository)
Tag string
// Platform to pull (e.g., "linux/amd64")
Platform string
// RegistryAuth is base64 encoded auth config
RegistryAuth string
}
PullOptions represents options for pulling an image.
type PullProgress ¶
type PullProgress struct {
Status string
ProgressDetail ProgressDetail
ID string
Error string
}
PullProgress represents progress information during an image pull.
type PullReader ¶
type PullReader interface {
io.ReadCloser
}
PullReader provides methods to read image pull progress.
type RemoveOptions ¶
type RemoveOptions struct {
RemoveVolumes bool // Remove associated volumes
RemoveLinks bool // Remove associated links
Force bool // Force removal of running container
}
RemoveOptions represents options for removing a container.
type ReplicatedService ¶
type ReplicatedService struct {
Replicas *uint64
}
ReplicatedService represents a replicated service mode.
type ResolutionMode ¶
type ResolutionMode string
ResolutionMode represents the endpoint resolution mode.
const ( ResolutionModeVIP ResolutionMode = "vip" ResolutionModeDNSRR ResolutionMode = "dnsrr" )
type ResourceRequirements ¶
ResourceRequirements represents resource constraints.
type RestartCondition ¶
type RestartCondition string
RestartCondition represents when to restart a task.
const ( RestartConditionNone RestartCondition = "none" RestartConditionOnFailure RestartCondition = "on-failure" RestartConditionAny RestartCondition = "any" )
type RestartPolicy ¶
type RestartPolicy struct {
Name string // "no", "always", "on-failure", "unless-stopped"
MaximumRetryCount int
}
RestartPolicy represents the restart policy for a container.
type Service ¶
type Service struct {
ID string
Meta ServiceMeta
Spec ServiceSpec
// Endpoint contains the exposed ports
Endpoint ServiceEndpoint
}
Service represents a Docker Swarm service.
type ServiceCreateOptions ¶
type ServiceCreateOptions struct {
// EncodedRegistryAuth is the base64url encoded auth configuration
EncodedRegistryAuth string
}
ServiceCreateOptions represents options for creating a service.
type ServiceEndpoint ¶
type ServiceEndpoint struct {
Spec *EndpointSpec
Ports []PortConfig
}
ServiceEndpoint represents the endpoint info for a service.
type ServiceListOptions ¶
ServiceListOptions represents options for listing services.
type ServiceMeta ¶
type ServiceMeta struct {
Version ServiceVersion
CreatedAt time.Time
UpdatedAt time.Time
}
ServiceMeta contains metadata about a service.
type ServiceMode ¶
type ServiceMode struct {
Replicated *ReplicatedService
Global *GlobalService
}
ServiceMode represents how the service should be scheduled.
type ServiceMount ¶
ServiceMount represents a mount for a service container.
type ServiceNotFoundError ¶
type ServiceNotFoundError struct {
ID string
}
ServiceNotFoundError indicates a service was not found.
func (*ServiceNotFoundError) Error ¶
func (e *ServiceNotFoundError) Error() string
func (*ServiceNotFoundError) Is ¶
func (e *ServiceNotFoundError) Is(target error) bool
Is implements error matching.
type ServiceRemoveOptions ¶
type ServiceRemoveOptions struct {
}
ServiceRemoveOptions represents options for removing a service.
type ServiceRestartPolicy ¶
type ServiceRestartPolicy struct {
Condition RestartCondition
Delay *time.Duration
MaxAttempts *uint64
Window *time.Duration
}
ServiceRestartPolicy represents the restart policy for a service.
type ServiceSpec ¶
type ServiceSpec struct {
Name string
Labels map[string]string
TaskTemplate TaskSpec
Mode ServiceMode
Networks []NetworkAttachment
EndpointSpec *EndpointSpec
}
ServiceSpec contains the specification for a service.
type ServiceVersion ¶
type ServiceVersion struct {
Index uint64
}
ServiceVersion contains version information for a service.
type SpreadOver ¶
type SpreadOver struct {
SpreadDescriptor string
}
SpreadOver represents spread placement configuration.
type SwarmInfo ¶
type SwarmInfo struct {
NodeID string
NodeAddr string
LocalNodeState LocalNodeState
ControlAvailable bool
Error string
RemoteManagers []Peer
Nodes int
Managers int
Cluster *ClusterInfo
}
SwarmInfo represents Swarm-related information.
type SystemInfo ¶
type SystemInfo struct {
ID string
Containers int
ContainersRunning int
ContainersPaused int
ContainersStopped int
Images int
Driver string
DriverStatus [][2]string
SystemStatus [][2]string
MemoryLimit bool
SwapLimit bool
CPUCfsPeriod bool
CPUCfsQuota bool
CPUSet bool
PidsLimit bool
IPv4Forwarding bool
Debug bool
NFd int
OomKillDisable bool
NGoroutines int
SystemTime string
LoggingDriver string
CgroupDriver string
CgroupVersion string
NEventsListener int
KernelVersion string
OperatingSystem string
OSVersion string
OSType string
Architecture string
IndexServerAddress string
NCPU int
MemTotal int64
DockerRootDir string
HTTPProxy string
HTTPSProxy string
NoProxy string
Name string
Labels []string
ExperimentalBuild bool
ServerVersion string
Runtimes map[string]Runtime
DefaultRuntime string
Swarm SwarmInfo
LiveRestoreEnabled bool
Isolation string
InitBinary string
SecurityOptions []string
Warnings []string
}
SystemInfo represents Docker system information.
type Task ¶
type Task struct {
ID string
ServiceID string
NodeID string
Status TaskStatus
DesiredState TaskState
Spec TaskSpec
CreatedAt time.Time
UpdatedAt time.Time
}
Task represents a Swarm task.
type TaskListOptions ¶
TaskListOptions represents options for listing tasks.
type TaskSpec ¶
type TaskSpec struct {
ContainerSpec ContainerSpec
Resources *ResourceRequirements
RestartPolicy *ServiceRestartPolicy
Placement *Placement
Networks []NetworkAttachment
LogDriver *LogDriver
}
TaskSpec represents the specification for a task.
type TaskState ¶
type TaskState string
TaskState represents the state of a task.
const ( TaskStateNew TaskState = "new" TaskStatePending TaskState = "pending" TaskStateAssigned TaskState = "assigned" TaskStateAccepted TaskState = "accepted" TaskStatePreparing TaskState = "preparing" TaskStateReady TaskState = "ready" TaskStateStarting TaskState = "starting" TaskStateRunning TaskState = "running" TaskStateComplete TaskState = "complete" TaskStateShutdown TaskState = "shutdown" TaskStateFailed TaskState = "failed" TaskStateRejected TaskState = "rejected" TaskStateRemove TaskState = "remove" TaskStateOrphaned TaskState = "orphaned" )
func (TaskState) IsTerminalState ¶
IsTerminalState returns true if the task is in a terminal state.
type TaskStatus ¶
type TaskStatus struct {
Timestamp time.Time
State TaskState
Message string
Err string
ContainerStatus *ContainerStatus
}
TaskStatus represents the status of a task.
type TmpfsOptions ¶
TmpfsOptions represents options for tmpfs mounts.
type Version ¶
type Version struct {
Platform Platform
Components []ComponentVersion
Version string
APIVersion string
MinAPIVersion string
GitCommit string
GoVersion string
Os string
Arch string
KernelVersion string
BuildTime string
}
Version represents Docker version information.
type VolumeOptions ¶
VolumeOptions represents options for volume mounts.
type VolumeSummary ¶
type VolumeSummary struct {
Name string
Driver string
Mountpoint string
CreatedAt string
Labels map[string]string
Scope string
Options map[string]string
UsageData *VolumeUsageData
}
VolumeSummary represents a volume summary for disk usage.
type VolumeUsageData ¶
VolumeUsageData represents volume usage data.
type WaitError ¶
type WaitError struct {
Message string
}
WaitError represents an error from the container wait operation.
type WaitResponse ¶
WaitResponse contains the response from waiting for a container.