types

package
v25.0.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package types is used for API stability in the types and response to the consumers of the API stats endpoint.

Index

Constants

View Source
const (
	RegistryAuthFromSpec         = "spec"
	RegistryAuthFromPreviousSpec = "previous-spec"
)

Values for RegistryAuthFrom in ServiceUpdateOptions

View Source
const (
	// MediaTypeRawStream is vendor specific MIME-Type set for raw TTY streams
	MediaTypeRawStream = "application/vnd.docker.raw-stream"

	// MediaTypeMultiplexedStream is vendor specific MIME-Type set for stdin/stdout/stderr multiplexed streams
	MediaTypeMultiplexedStream = "application/vnd.docker.multiplexed-stream"
)
View Source
const (
	NoHealthcheck = "none"      // Indicates there is no healthcheck
	Starting      = "starting"  // Starting indicates that the container is not yet ready
	Healthy       = "healthy"   // Healthy indicates that the container is running correctly
	Unhealthy     = "unhealthy" // Unhealthy indicates that the container has a problem
)

Health states

Variables

This section is empty.

Functions

func DecodeSecurityOptions deprecated

func DecodeSecurityOptions(opts []string) ([]system.SecurityOpt, error)

DecodeSecurityOptions decodes a security options string slice to a type safe system.SecurityOpt.

Deprecated: use system.DecodeSecurityOptions.

Types

type BlkioStatEntry

type BlkioStatEntry struct {
	Major uint64 `json:"major"`
	Minor uint64 `json:"minor"`
	Op    string `json:"op"`
	Value uint64 `json:"value"`
}

BlkioStatEntry is one small entity to store a piece of Blkio stats Not used on Windows.

type BlkioStats

type BlkioStats struct {
	// number of bytes transferred to and from the block device
	IoServiceBytesRecursive []BlkioStatEntry `json:"io_service_bytes_recursive"`
	IoServicedRecursive     []BlkioStatEntry `json:"io_serviced_recursive"`
	IoQueuedRecursive       []BlkioStatEntry `json:"io_queue_recursive"`
	IoServiceTimeRecursive  []BlkioStatEntry `json:"io_service_time_recursive"`
	IoWaitTimeRecursive     []BlkioStatEntry `json:"io_wait_time_recursive"`
	IoMergedRecursive       []BlkioStatEntry `json:"io_merged_recursive"`
	IoTimeRecursive         []BlkioStatEntry `json:"io_time_recursive"`
	SectorsRecursive        []BlkioStatEntry `json:"sectors_recursive"`
}

BlkioStats stores All IO service stats for data read and write. This is a Linux specific structure as the differences between expressing block I/O on Windows and Linux are sufficiently significant to make little sense attempting to morph into a combined structure.

type BuildCache

type BuildCache struct {
	// ID is the unique ID of the build cache record.
	ID string
	// Parent is the ID of the parent build cache record.
	//
	// Deprecated: deprecated in API v1.42 and up, as it was deprecated in BuildKit; use Parents instead.
	Parent string `json:"Parent,omitempty"`
	// Parents is the list of parent build cache record IDs.
	Parents []string `json:" Parents,omitempty"`
	// Type is the cache record type.
	Type string
	// Description is a description of the build-step that produced the build cache.
	Description string
	// InUse indicates if the build cache is in use.
	InUse bool
	// Shared indicates if the build cache is shared.
	Shared bool
	// Size is the amount of disk space used by the build cache (in bytes).
	Size int64
	// CreatedAt is the date and time at which the build cache was created.
	CreatedAt time.Time
	// LastUsedAt is the date and time at which the build cache was last used.
	LastUsedAt *time.Time
	UsageCount int
}

BuildCache contains information about a build cache record.

type BuildCachePruneOptions

type BuildCachePruneOptions struct {
	All         bool
	KeepStorage int64
	Filters     filters.Args
}

BuildCachePruneOptions hold parameters to prune the build cache

type BuildCachePruneReport

type BuildCachePruneReport struct {
	CachesDeleted  []string
	SpaceReclaimed uint64
}

BuildCachePruneReport contains the response for Engine API: POST "/build/prune"

type BuildResult

type BuildResult struct {
	ID string
}

BuildResult contains the image id of a successful build

type BuilderVersion

type BuilderVersion string

BuilderVersion sets the version of underlying builder to use

const (
	// BuilderV1 is the first generation builder in docker daemon
	BuilderV1 BuilderVersion = "1"
	// BuilderBuildKit is builder based on moby/buildkit project
	BuilderBuildKit BuilderVersion = "2"
)

type CPUStats

type CPUStats struct {
	// CPU Usage. Linux and Windows.
	CPUUsage CPUUsage `json:"cpu_usage"`

	// System Usage. Linux only.
	SystemUsage uint64 `json:"system_cpu_usage,omitempty"`

	// Online CPUs. Linux only.
	OnlineCPUs uint32 `json:"online_cpus,omitempty"`

	// Throttling Data. Linux only.
	ThrottlingData ThrottlingData `json:"throttling_data,omitempty"`
}

CPUStats aggregates and wraps all CPU related info of container

type CPUUsage

type CPUUsage struct {
	// Total CPU time consumed.
	// Units: nanoseconds (Linux)
	// Units: 100's of nanoseconds (Windows)
	TotalUsage uint64 `json:"total_usage"`

	// Total CPU time consumed per core (Linux). Not used on Windows.
	// Units: nanoseconds.
	PercpuUsage []uint64 `json:"percpu_usage,omitempty"`

	// Time spent by tasks of the cgroup in kernel mode (Linux).
	// Time spent by all container processes in kernel mode (Windows).
	// Units: nanoseconds (Linux).
	// Units: 100's of nanoseconds (Windows). Not populated for Hyper-V Containers.
	UsageInKernelmode uint64 `json:"usage_in_kernelmode"`

	// Time spent by tasks of the cgroup in user mode (Linux).
	// Time spent by all container processes in user mode (Windows).
	// Units: nanoseconds (Linux).
	// Units: 100's of nanoseconds (Windows). Not populated for Hyper-V Containers
	UsageInUsermode uint64 `json:"usage_in_usermode"`
}

CPUUsage stores All CPU stats aggregated since container inception.

type Checkpoint deprecated

type Checkpoint = checkpoint.Summary

Checkpoint represents the details of a checkpoint when listing endpoints.

Deprecated: use checkpoint.Summary.

type CheckpointCreateOptions deprecated

type CheckpointCreateOptions = checkpoint.CreateOptions

CheckpointCreateOptions holds parameters to create a checkpoint from a container.

Deprecated: use checkpoint.CreateOptions.

type CheckpointDeleteOptions deprecated

type CheckpointDeleteOptions = checkpoint.DeleteOptions

CheckpointDeleteOptions holds parameters to delete a checkpoint from a container

Deprecated: use checkpoint.DeleteOptions.

type CheckpointListOptions deprecated

type CheckpointListOptions = checkpoint.ListOptions

CheckpointListOptions holds parameters to list checkpoints for a container

Deprecated: use checkpoint.ListOptions.

type CloseWriter

type CloseWriter interface {
	CloseWrite() error
}

CloseWriter is an interface that implements structs that close input streams to prevent from writing.

type Commit deprecated

type Commit = system.Commit

Commit holds the Git-commit (SHA1) that a binary was built from, as reported in the version-string of external tools, such as containerd, or runC.

Deprecated: use system.Commit.

type ComponentVersion

type ComponentVersion struct {
	Name    string
	Version string
	Details map[string]string `json:",omitempty"`
}

ComponentVersion describes the version information for a specific component.

type ConfigCreateResponse

type ConfigCreateResponse struct {
	// ID is the id of the created config.
	ID string
}

ConfigCreateResponse contains the information returned to a client on the creation of a new config.

type ConfigListOptions

type ConfigListOptions struct {
	Filters filters.Args
}

ConfigListOptions holds parameters to list configs

type Container

type Container struct {
	ID         string `json:"Id"`
	Names      []string
	Image      string
	ImageID    string
	Command    string
	Created    int64
	Ports      []Port
	SizeRw     int64 `json:",omitempty"`
	SizeRootFs int64 `json:",omitempty"`
	Labels     map[string]string
	State      string
	Status     string
	HostConfig struct {
		NetworkMode string `json:",omitempty"`
	}
	NetworkSettings *SummaryNetworkSettings
	Mounts          []MountPoint
}

Container contains response of Engine API: GET "/containers/json"

type ContainerAttachOptions deprecated

type ContainerAttachOptions = container.AttachOptions

ContainerAttachOptions holds parameters to attach to a container.

Deprecated: use container.AttachOptions.

type ContainerCommitOptions deprecated

type ContainerCommitOptions = container.CommitOptions

ContainerCommitOptions holds parameters to commit changes into a container.

Deprecated: use container.CommitOptions.

type ContainerExecInspect

type ContainerExecInspect struct {
	ExecID      string `json:"ID"`
	ContainerID string
	Running     bool
	ExitCode    int
	Pid         int
}

ContainerExecInspect holds information returned by exec inspect.

type ContainerJSON

type ContainerJSON struct {
	*ContainerJSONBase
	Mounts          []MountPoint
	Config          *container.Config
	NetworkSettings *NetworkSettings
}

ContainerJSON is newly used struct along with MountPoint

type ContainerJSONBase

type ContainerJSONBase struct {
	ID              string `json:"Id"`
	Created         string
	Path            string
	Args            []string
	State           *ContainerState
	Image           string
	ResolvConfPath  string
	HostnamePath    string
	HostsPath       string
	LogPath         string
	Node            *ContainerNode `json:",omitempty"` // Node is only propagated by Docker Swarm standalone API
	Name            string
	RestartCount    int
	Driver          string
	Platform        string
	MountLabel      string
	ProcessLabel    string
	AppArmorProfile string
	ExecIDs         []string
	HostConfig      *container.HostConfig
	GraphDriver     GraphDriverData
	SizeRw          *int64 `json:",omitempty"`
	SizeRootFs      *int64 `json:",omitempty"`
}

ContainerJSONBase contains response of Engine API: GET "/containers/{name:.*}/json"

type ContainerListOptions deprecated

type ContainerListOptions = container.ListOptions

ContainerListOptions holds parameters to list containers with.

Deprecated: use container.ListOptions.

type ContainerLogsOptions deprecated

type ContainerLogsOptions = container.LogsOptions

ContainerLogsOptions holds parameters to filter logs with.

Deprecated: use container.LogsOptions.

type ContainerNode

type ContainerNode struct {
	ID        string
	IPAddress string `json:"IP"`
	Addr      string
	Name      string
	Cpus      int
	Memory    int64
	Labels    map[string]string
}

ContainerNode stores information about the node that a container is running on. It's only used by the Docker Swarm standalone API

type ContainerPathStat

type ContainerPathStat struct {
	Name       string      `json:"name"`
	Size       int64       `json:"size"`
	Mode       os.FileMode `json:"mode"`
	Mtime      time.Time   `json:"mtime"`
	LinkTarget string      `json:"linkTarget"`
}

ContainerPathStat is used to encode the header from GET "/containers/{name:.*}/archive" "Name" is the file or directory name.

type ContainerRemoveOptions deprecated

type ContainerRemoveOptions = container.RemoveOptions

ContainerRemoveOptions holds parameters to remove containers.

Deprecated: use container.RemoveOptions.

type ContainerStartOptions deprecated

type ContainerStartOptions = container.StartOptions

ContainerStartOptions holds parameters to start containers.

Deprecated: use container.StartOptions.

type ContainerState

type ContainerState struct {
	Status     string // String representation of the container state. Can be one of "created", "running", "paused", "restarting", "removing", "exited", or "dead"
	Running    bool
	Paused     bool
	Restarting bool
	OOMKilled  bool
	Dead       bool
	Pid        int
	ExitCode   int
	Error      string
	StartedAt  string
	FinishedAt string
	Health     *Health `json:",omitempty"`
}

ContainerState stores container's running state it's part of ContainerJSONBase and will return by "inspect" command

type ContainerStats

type ContainerStats struct {
	Body   io.ReadCloser `json:"body"`
	OSType string        `json:"ostype"`
}

ContainerStats contains response of Engine API: GET "/stats"

type ContainersPruneReport

type ContainersPruneReport struct {
	ContainersDeleted []string
	SpaceReclaimed    uint64
}

ContainersPruneReport contains the response for Engine API: POST "/containers/prune"

type CopyConfig

type CopyConfig struct {
	Resource string
}

CopyConfig contains request body of Engine API: POST "/containers/"+containerID+"/copy"

type CopyToContainerOptions

type CopyToContainerOptions struct {
	AllowOverwriteDirWithFile bool
	CopyUIDGID                bool
}

CopyToContainerOptions holds information about files to copy into a container

type DefaultNetworkSettings

type DefaultNetworkSettings struct {
	EndpointID          string // EndpointID uniquely represents a service endpoint in a Sandbox
	Gateway             string // Gateway holds the gateway address for the network
	GlobalIPv6Address   string // GlobalIPv6Address holds network's global IPv6 address
	GlobalIPv6PrefixLen int    // GlobalIPv6PrefixLen represents mask length of network's global IPv6 address
	IPAddress           string // IPAddress holds the IPv4 address for the network
	IPPrefixLen         int    // IPPrefixLen represents mask length of network's IPv4 address
	IPv6Gateway         string // IPv6Gateway holds gateway address specific for IPv6
	MacAddress          string // MacAddress holds the MAC address for the network
}

DefaultNetworkSettings holds network information during the 2 release deprecation period. It will be removed in Docker 1.11.

type DiskUsage

type DiskUsage struct {
	LayersSize  int64
	Images      []*image.Summary
	Containers  []*Container
	Volumes     []*volume.Volume
	BuildCache  []*BuildCache
	BuilderSize int64 `json:",omitempty"` // Deprecated: deprecated in API 1.38, and no longer used since API 1.40.
}

DiskUsage contains response of Engine API: GET "/system/df"

type DiskUsageObject

type DiskUsageObject string

DiskUsageObject represents an object type used for disk usage query filtering.

const (
	// ContainerObject represents a container DiskUsageObject.
	ContainerObject DiskUsageObject = "container"
	// ImageObject represents an image DiskUsageObject.
	ImageObject DiskUsageObject = "image"
	// VolumeObject represents a volume DiskUsageObject.
	VolumeObject DiskUsageObject = "volume"
	// BuildCacheObject represents a build-cache DiskUsageObject.
	BuildCacheObject DiskUsageObject = "build-cache"
)

type DiskUsageOptions

type DiskUsageOptions struct {
	// Types specifies what object types to include in the response. If empty,
	// all object types are returned.
	Types []DiskUsageObject
}

DiskUsageOptions holds parameters for system disk usage query.

type EndpointResource

type EndpointResource struct {
	Name        string
	EndpointID  string
	MacAddress  string
	IPv4Address string
	IPv6Address string
}

EndpointResource contains network resources allocated and used for a container in a network

type ErrorResponse

type ErrorResponse struct {

	// The error message.
	// Required: true
	Message string `json:"message"`
}

ErrorResponse Represents an error. swagger:model ErrorResponse

func (ErrorResponse) Error

func (e ErrorResponse) Error() string

Error returns the error message

type EventsOptions

type EventsOptions struct {
	Since   string
	Until   string
	Filters filters.Args
}

EventsOptions holds parameters to filter events with.

type ExecConfig

type ExecConfig struct {
	User         string   // User that will run the command
	Privileged   bool     // Is the container in privileged mode
	Tty          bool     // Attach standard streams to a tty.
	ConsoleSize  *[2]uint `json:",omitempty"` // Initial console size [height, width]
	AttachStdin  bool     // Attach the standard input, makes possible user interaction
	AttachStderr bool     // Attach the standard error
	AttachStdout bool     // Attach the standard output
	Detach       bool     // Execute in detach mode
	DetachKeys   string   // Escape keys for detach
	Env          []string // Environment variables
	WorkingDir   string   // Working directory
	Cmd          []string // Execution commands and args
}

ExecConfig is a small subset of the Config struct that holds the configuration for the exec feature of docker.

type ExecStartCheck

type ExecStartCheck struct {
	// ExecStart will first check if it's detached
	Detach bool
	// Check if there's a tty
	Tty bool
	// Terminal size [height, width], unused if Tty == false
	ConsoleSize *[2]uint `json:",omitempty"`
}

ExecStartCheck is a temp struct used by execStart Config fields is part of ExecConfig in runconfig package

type GraphDriverData

type GraphDriverData struct {

	// Low-level storage metadata, provided as key/value pairs.
	//
	// This information is driver-specific, and depends on the storage-driver
	// in use, and should be used for informational purposes only.
	//
	// Required: true
	Data map[string]string `json:"Data"`

	// Name of the storage driver.
	// Required: true
	Name string `json:"Name"`
}

GraphDriverData Information about the storage driver used to store the container's and image's filesystem.

swagger:model GraphDriverData

type Health

type Health struct {
	Status        string               // Status is one of Starting, Healthy or Unhealthy
	FailingStreak int                  // FailingStreak is the number of consecutive failures
	Log           []*HealthcheckResult // Log contains the last few results (oldest first)
}

Health stores information about the container's healthcheck results

type HealthcheckResult

type HealthcheckResult struct {
	Start    time.Time // Start is the time this check started
	End      time.Time // End is the time this check ended
	ExitCode int       // ExitCode meanings: 0=healthy, 1=unhealthy, 2=reserved (considered unhealthy), else=error running probe
	Output   string    // Output from last check
}

HealthcheckResult stores information about a single run of a healthcheck probe

type HijackedResponse

type HijackedResponse struct {
	Conn   net.Conn
	Reader *bufio.Reader
	// contains filtered or unexported fields
}

HijackedResponse holds connection information for a hijacked request.

func NewHijackedResponse

func NewHijackedResponse(conn net.Conn, mediaType string) HijackedResponse

NewHijackedResponse intializes a HijackedResponse type

func (*HijackedResponse) Close

func (h *HijackedResponse) Close()

Close closes the hijacked connection and reader.

func (*HijackedResponse) CloseWrite

func (h *HijackedResponse) CloseWrite() error

CloseWrite closes a readWriter for writing.

func (*HijackedResponse) MediaType

func (h *HijackedResponse) MediaType() (string, bool)

MediaType let client know if HijackedResponse hold a raw or multiplexed stream. returns false if HTTP Content-Type is not relevant, and container must be inspected

type IDResponse

type IDResponse struct {

	// The id of the newly created object.
	// Required: true
	ID string `json:"Id"`
}

IDResponse Response to an API call that returns just an Id swagger:model IdResponse

type ImageBuildOptions

type ImageBuildOptions struct {
	Tags           []string
	SuppressOutput bool
	RemoteContext  string
	NoCache        bool
	Remove         bool
	ForceRemove    bool
	PullParent     bool
	Isolation      container.Isolation
	CPUSetCPUs     string
	CPUSetMems     string
	CPUShares      int64
	CPUQuota       int64
	CPUPeriod      int64
	Memory         int64
	MemorySwap     int64
	CgroupParent   string
	NetworkMode    string
	ShmSize        int64
	Dockerfile     string
	Ulimits        []*units.Ulimit
	// BuildArgs needs to be a *string instead of just a string so that
	// we can tell the difference between "" (empty string) and no value
	// at all (nil). See the parsing of buildArgs in
	// api/server/router/build/build_routes.go for even more info.
	BuildArgs   map[string]*string
	AuthConfigs map[string]registry.AuthConfig
	Context     io.Reader
	Labels      map[string]string
	// squash the resulting image's layers to the parent
	// preserves the original image and creates a new one from the parent with all
	// the changes applied to a single layer
	Squash bool
	// CacheFrom specifies images that are used for matching cache. Images
	// specified here do not need to have a valid parent chain to match cache.
	CacheFrom   []string
	SecurityOpt []string
	ExtraHosts  []string // List of extra hosts
	Target      string
	SessionID   string
	Platform    string
	// Version specifies the version of the unerlying builder to use
	Version BuilderVersion
	// BuildID is an optional identifier that can be passed together with the
	// build request. The same identifier can be used to gracefully cancel the
	// build with the cancel request.
	BuildID string
	// Outputs defines configurations for exporting build results. Only supported
	// in BuildKit mode
	Outputs []ImageBuildOutput
}

ImageBuildOptions holds the information necessary to build images.

type ImageBuildOutput

type ImageBuildOutput struct {
	Type  string
	Attrs map[string]string
}

ImageBuildOutput defines configuration for exporting a build result

type ImageBuildResponse

type ImageBuildResponse struct {
	Body   io.ReadCloser
	OSType string
}

ImageBuildResponse holds information returned by a server after building an image.

type ImageCreateOptions

type ImageCreateOptions struct {
	RegistryAuth string // RegistryAuth is the base64 encoded credentials for the registry.
	Platform     string // Platform is the target platform of the image if it needs to be pulled from the registry.
}

ImageCreateOptions holds information to create images.

type ImageDeleteResponseItem deprecated

type ImageDeleteResponseItem = image.DeleteResponse

ImageDeleteResponseItem image delete response item.

Deprecated: use image.DeleteResponse.

type ImageImportOptions

type ImageImportOptions struct {
	Tag      string   // Tag is the name to tag this image with. This attribute is deprecated.
	Message  string   // Message is the message to tag the image with
	Changes  []string // Changes are the raw changes to apply to this image
	Platform string   // Platform is the target platform of the image
}

ImageImportOptions holds information to import images from the client host.

type ImageImportSource

type ImageImportSource struct {
	Source     io.Reader // Source is the data to send to the server to create this image from. You must set SourceName to "-" to leverage this.
	SourceName string    // SourceName is the name of the image to pull. Set to "-" to leverage the Source attribute.
}

ImageImportSource holds source information for ImageImport

type ImageInspect

type ImageInspect struct {
	// ID is the content-addressable ID of an image.
	//
	// This identifier is a content-addressable digest calculated from the
	// image's configuration (which includes the digests of layers used by
	// the image).
	//
	// Note that this digest differs from the `RepoDigests` below, which
	// holds digests of image manifests that reference the image.
	ID string `json:"Id"`

	// RepoTags is a list of image names/tags in the local image cache that
	// reference this image.
	//
	// Multiple image tags can refer to the same image, and this list may be
	// empty if no tags reference the image, in which case the image is
	// "untagged", in which case it can still be referenced by its ID.
	RepoTags []string

	// RepoDigests is a list of content-addressable digests of locally available
	// image manifests that the image is referenced from. Multiple manifests can
	// refer to the same image.
	//
	// These digests are usually only available if the image was either pulled
	// from a registry, or if the image was pushed to a registry, which is when
	// the manifest is generated and its digest calculated.
	RepoDigests []string

	// Parent is the ID of the parent image.
	//
	// Depending on how the image was created, this field may be empty and
	// is only set for images that were built/created locally. This field
	// is empty if the image was pulled from an image registry.
	Parent string

	// Comment is an optional message that can be set when committing or
	// importing the image.
	Comment string

	// Created is the date and time at which the image was created, formatted in
	// RFC 3339 nano-seconds (time.RFC3339Nano).
	//
	// This information is only available if present in the image,
	// and omitted otherwise.
	Created string `json:",omitempty"`

	// Container is the ID of the container that was used to create the image.
	//
	// Depending on how the image was created, this field may be empty.
	//
	// Deprecated: this field is omitted in API v1.45, but kept for backward compatibility.
	Container string

	// ContainerConfig is an optional field containing the configuration of the
	// container that was last committed when creating the image.
	//
	// Previous versions of Docker builder used this field to store build cache,
	// and it is not in active use anymore.
	//
	// Deprecated: this field is omitted in API v1.45, but kept for backward compatibility.
	ContainerConfig *container.Config

	// DockerVersion is the version of Docker that was used to build the image.
	//
	// Depending on how the image was created, this field may be empty.
	DockerVersion string

	// Author is the name of the author that was specified when committing the
	// image, or as specified through MAINTAINER (deprecated) in the Dockerfile.
	Author string
	Config *container.Config

	// Architecture is the hardware CPU architecture that the image runs on.
	Architecture string

	// Variant is the CPU architecture variant (presently ARM-only).
	Variant string `json:",omitempty"`

	// OS is the Operating System the image is built to run on.
	Os string

	// OsVersion is the version of the Operating System the image is built to
	// run on (especially for Windows).
	OsVersion string `json:",omitempty"`

	// Size is the total size of the image including all layers it is composed of.
	Size int64

	// VirtualSize is the total size of the image including all layers it is
	// composed of.
	//
	// Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead.
	VirtualSize int64 `json:"VirtualSize,omitempty"`

	// GraphDriver holds information about the storage driver used to store the
	// container's and image's filesystem.
	GraphDriver GraphDriverData

	// RootFS contains information about the image's RootFS, including the
	// layer IDs.
	RootFS RootFS

	// Metadata of the image in the local cache.
	//
	// This information is local to the daemon, and not part of the image itself.
	Metadata image.Metadata
}

ImageInspect contains response of Engine API: GET "/images/{name:.*}/json"

type ImageListOptions

type ImageListOptions struct {
	// All controls whether all images in the graph are filtered, or just
	// the heads.
	All bool

	// Filters is a JSON-encoded set of filter arguments.
	Filters filters.Args

	// SharedSize indicates whether the shared size of images should be computed.
	SharedSize bool

	// ContainerCount indicates whether container count should be computed.
	ContainerCount bool
}

ImageListOptions holds parameters to list images with.

type ImageLoadResponse

type ImageLoadResponse struct {
	// Body must be closed to avoid a resource leak
	Body io.ReadCloser
	JSON bool
}

ImageLoadResponse returns information to the client about a load process.

type ImageMetadata deprecated

type ImageMetadata = image.Metadata

ImageMetadata contains engine-local data about the image.

Deprecated: use image.Metadata.

type ImagePullOptions

type ImagePullOptions struct {
	All           bool
	RegistryAuth  string // RegistryAuth is the base64 encoded credentials for the registry
	PrivilegeFunc RequestPrivilegeFunc
	Platform      string
}

ImagePullOptions holds information to pull images.

type ImagePushOptions

type ImagePushOptions ImagePullOptions

ImagePushOptions holds information to push images.

type ImageRemoveOptions

type ImageRemoveOptions struct {
	Force         bool
	PruneChildren bool
}

ImageRemoveOptions holds parameters to remove images.

type ImageSearchOptions

type ImageSearchOptions struct {
	RegistryAuth  string
	PrivilegeFunc RequestPrivilegeFunc
	Filters       filters.Args
	Limit         int
}

ImageSearchOptions holds parameters to search images with.

type ImageSummary deprecated

type ImageSummary = image.Summary

ImageSummary image summary.

Deprecated: use image.Summary.

type ImagesPruneReport

type ImagesPruneReport struct {
	ImagesDeleted  []image.DeleteResponse
	SpaceReclaimed uint64
}

ImagesPruneReport contains the response for Engine API: POST "/images/prune"

type Info deprecated

type Info = system.Info

Info contains response of Engine API: GET "/info"

Deprecated: use system.Info.

type KeyValue deprecated

type KeyValue = system.KeyValue

KeyValue holds a key/value pair.

Deprecated: use system.KeyValue.

type MemoryStats

type MemoryStats struct {

	// current res_counter usage for memory
	Usage uint64 `json:"usage,omitempty"`
	// maximum usage ever recorded.
	MaxUsage uint64 `json:"max_usage,omitempty"`
	// TODO(vishh): Export these as stronger types.
	// all the stats exported via memory.stat.
	Stats map[string]uint64 `json:"stats,omitempty"`
	// number of times memory usage hits limits.
	Failcnt uint64 `json:"failcnt,omitempty"`
	Limit   uint64 `json:"limit,omitempty"`

	// committed bytes
	Commit uint64 `json:"commitbytes,omitempty"`
	// peak committed bytes
	CommitPeak uint64 `json:"commitpeakbytes,omitempty"`
	// private working set
	PrivateWorkingSet uint64 `json:"privateworkingset,omitempty"`
}

MemoryStats aggregates all memory stats since container inception on Linux. Windows returns stats for commit and private working set only.

type MountPoint

type MountPoint struct {
	// Type is the type of mount, see `Type<foo>` definitions in
	// github.com/docker/docker/api/types/mount.Type
	Type mount.Type `json:",omitempty"`

	// Name is the name reference to the underlying data defined by `Source`
	// e.g., the volume name.
	Name string `json:",omitempty"`

	// Source is the source location of the mount.
	//
	// For volumes, this contains the storage location of the volume (within
	// `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains
	// the source (host) part of the bind-mount. For `tmpfs` mount points, this
	// field is empty.
	Source string

	// Destination is the path relative to the container root (`/`) where the
	// Source is mounted inside the container.
	Destination string

	// Driver is the volume driver used to create the volume (if it is a volume).
	Driver string `json:",omitempty"`

	// Mode is a comma separated list of options supplied by the user when
	// creating the bind/volume mount.
	//
	// The default is platform-specific (`"z"` on Linux, empty on Windows).
	Mode string

	// RW indicates whether the mount is mounted writable (read-write).
	RW bool

	// Propagation describes how mounts are propagated from the host into the
	// mount point, and vice-versa. Refer to the Linux kernel documentation
	// for details:
	// https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt
	//
	// This field is not used on Windows.
	Propagation mount.Propagation
}

MountPoint represents a mount point configuration inside the container. This is used for reporting the mountpoints in use by a container.

type NetworkAddressPool deprecated

type NetworkAddressPool = system.NetworkAddressPool

NetworkAddressPool is a temp struct used by system.Info struct.

Deprecated: use system.NetworkAddressPool.

type NetworkConnect

type NetworkConnect struct {
	Container      string
	EndpointConfig *network.EndpointSettings `json:",omitempty"`
}

NetworkConnect represents the data to be used to connect a container to the network

type NetworkCreate

type NetworkCreate struct {
	// Deprecated: CheckDuplicate is deprecated since API v1.44, but it defaults to true when sent by the client
	// package to older daemons.
	CheckDuplicate bool `json:",omitempty"`
	Driver         string
	Scope          string
	EnableIPv6     bool
	IPAM           *network.IPAM
	Internal       bool
	Attachable     bool
	Ingress        bool
	ConfigOnly     bool
	ConfigFrom     *network.ConfigReference
	Options        map[string]string
	Labels         map[string]string
}

NetworkCreate is the expected body of the "create network" http request message

type NetworkCreateRequest

type NetworkCreateRequest struct {
	NetworkCreate
	Name string
}

NetworkCreateRequest is the request message sent to the server for network create call.

type NetworkCreateResponse

type NetworkCreateResponse struct {
	ID      string `json:"Id"`
	Warning string
}

NetworkCreateResponse is the response message sent by the server for network create call

type NetworkDisconnect

type NetworkDisconnect struct {
	Container string
	Force     bool
}

NetworkDisconnect represents the data to be used to disconnect a container from the network

type NetworkInspectOptions

type NetworkInspectOptions struct {
	Scope   string
	Verbose bool
}

NetworkInspectOptions holds parameters to inspect network

type NetworkListOptions

type NetworkListOptions struct {
	Filters filters.Args
}

NetworkListOptions holds parameters to filter the list of networks with.

type NetworkResource

type NetworkResource struct {
	Name       string                         // Name is the requested name of the network
	ID         string                         `json:"Id"` // ID uniquely identifies a network on a single machine
	Created    time.Time                      // Created is the time the network created
	Scope      string                         // Scope describes the level at which the network exists (e.g. `swarm` for cluster-wide or `local` for machine level)
	Driver     string                         // Driver is the Driver name used to create the network (e.g. `bridge`, `overlay`)
	EnableIPv6 bool                           // EnableIPv6 represents whether to enable IPv6
	IPAM       network.IPAM                   // IPAM is the network's IP Address Management
	Internal   bool                           // Internal represents if the network is used internal only
	Attachable bool                           // Attachable represents if the global scope is manually attachable by regular containers from workers in swarm mode.
	Ingress    bool                           // Ingress indicates the network is providing the routing-mesh for the swarm cluster.
	ConfigFrom network.ConfigReference        // ConfigFrom specifies the source which will provide the configuration for this network.
	ConfigOnly bool                           // ConfigOnly networks are place-holder networks for network configurations to be used by other networks. ConfigOnly networks cannot be used directly to run containers or services.
	Containers map[string]EndpointResource    // Containers contains endpoints belonging to the network
	Options    map[string]string              // Options holds the network specific options to use for when creating the network
	Labels     map[string]string              // Labels holds metadata specific to the network being created
	Peers      []network.PeerInfo             `json:",omitempty"` // List of peer nodes for an overlay network
	Services   map[string]network.ServiceInfo `json:",omitempty"`
}

NetworkResource is the body of the "get network" http response message

type NetworkSettings

type NetworkSettings struct {
	NetworkSettingsBase
	DefaultNetworkSettings
	Networks map[string]*network.EndpointSettings
}

NetworkSettings exposes the network settings in the api

type NetworkSettingsBase

type NetworkSettingsBase struct {
	Bridge     string      // Bridge contains the name of the default bridge interface iff it was set through the daemon --bridge flag.
	SandboxID  string      // SandboxID uniquely represents a container's network stack
	SandboxKey string      // SandboxKey identifies the sandbox
	Ports      nat.PortMap // Ports is a collection of PortBinding indexed by Port

	// HairpinMode specifies if hairpin NAT should be enabled on the virtual interface
	//
	// Deprecated: This field is never set and will be removed in a future release.
	HairpinMode bool
	// LinkLocalIPv6Address is an IPv6 unicast address using the link-local prefix
	//
	// Deprecated: This field is never set and will be removed in a future release.
	LinkLocalIPv6Address string
	// LinkLocalIPv6PrefixLen is the prefix length of an IPv6 unicast address
	//
	// Deprecated: This field is never set and will be removed in a future release.
	LinkLocalIPv6PrefixLen int
	SecondaryIPAddresses   []network.Address // Deprecated: This field is never set and will be removed in a future release.
	SecondaryIPv6Addresses []network.Address // Deprecated: This field is never set and will be removed in a future release.
}

NetworkSettingsBase holds networking state for a container when inspecting it.

type NetworkStats

type NetworkStats struct {
	// Bytes received. Windows and Linux.
	RxBytes uint64 `json:"rx_bytes"`
	// Packets received. Windows and Linux.
	RxPackets uint64 `json:"rx_packets"`
	// Received errors. Not used on Windows. Note that we don't `omitempty` this
	// field as it is expected in the >=v1.21 API stats structure.
	RxErrors uint64 `json:"rx_errors"`
	// Incoming packets dropped. Windows and Linux.
	RxDropped uint64 `json:"rx_dropped"`
	// Bytes sent. Windows and Linux.
	TxBytes uint64 `json:"tx_bytes"`
	// Packets sent. Windows and Linux.
	TxPackets uint64 `json:"tx_packets"`
	// Sent errors. Not used on Windows. Note that we don't `omitempty` this
	// field as it is expected in the >=v1.21 API stats structure.
	TxErrors uint64 `json:"tx_errors"`
	// Outgoing packets dropped. Windows and Linux.
	TxDropped uint64 `json:"tx_dropped"`
	// Endpoint ID. Not used on Linux.
	EndpointID string `json:"endpoint_id,omitempty"`
	// Instance ID. Not used on Linux.
	InstanceID string `json:"instance_id,omitempty"`
}

NetworkStats aggregates the network stats of one container

type NetworksPruneReport

type NetworksPruneReport struct {
	NetworksDeleted []string
}

NetworksPruneReport contains the response for Engine API: POST "/networks/prune"

type NodeListOptions

type NodeListOptions struct {
	Filters filters.Args
}

NodeListOptions holds parameters to list nodes with.

type NodeRemoveOptions

type NodeRemoveOptions struct {
	Force bool
}

NodeRemoveOptions holds parameters to remove nodes with.

type PidsStats

type PidsStats struct {
	// Current is the number of pids in the cgroup
	Current uint64 `json:"current,omitempty"`
	// Limit is the hard limit on the number of pids in the cgroup.
	// A "Limit" of 0 means that there is no limit.
	Limit uint64 `json:"limit,omitempty"`
}

PidsStats contains the stats of a container's pids

type Ping

type Ping struct {
	APIVersion     string
	OSType         string
	Experimental   bool
	BuilderVersion BuilderVersion

	// SwarmStatus provides information about the current swarm status of the
	// engine, obtained from the "Swarm" header in the API response.
	//
	// It can be a nil struct if the API version does not provide this header
	// in the ping response, or if an error occurred, in which case the client
	// should use other ways to get the current swarm status, such as the /swarm
	// endpoint.
	SwarmStatus *swarm.Status
}

Ping contains response of Engine API: GET "/_ping"

type Plugin

type Plugin struct {

	// config
	// Required: true
	Config PluginConfig `json:"Config"`

	// True if the plugin is running. False if the plugin is not running, only installed.
	// Required: true
	Enabled bool `json:"Enabled"`

	// Id
	ID string `json:"Id,omitempty"`

	// name
	// Required: true
	Name string `json:"Name"`

	// plugin remote reference used to push/pull the plugin
	PluginReference string `json:"PluginReference,omitempty"`

	// settings
	// Required: true
	Settings PluginSettings `json:"Settings"`
}

Plugin A plugin for the Engine API swagger:model Plugin

type PluginConfig

type PluginConfig struct {

	// args
	// Required: true
	Args PluginConfigArgs `json:"Args"`

	// description
	// Required: true
	Description string `json:"Description"`

	// Docker Version used to create the plugin
	DockerVersion string `json:"DockerVersion,omitempty"`

	// documentation
	// Required: true
	Documentation string `json:"Documentation"`

	// entrypoint
	// Required: true
	Entrypoint []string `json:"Entrypoint"`

	// env
	// Required: true
	Env []PluginEnv `json:"Env"`

	// interface
	// Required: true
	Interface PluginConfigInterface `json:"Interface"`

	// ipc host
	// Required: true
	IpcHost bool `json:"IpcHost"`

	// linux
	// Required: true
	Linux PluginConfigLinux `json:"Linux"`

	// mounts
	// Required: true
	Mounts []PluginMount `json:"Mounts"`

	// network
	// Required: true
	Network PluginConfigNetwork `json:"Network"`

	// pid host
	// Required: true
	PidHost bool `json:"PidHost"`

	// propagated mount
	// Required: true
	PropagatedMount string `json:"PropagatedMount"`

	// user
	User PluginConfigUser `json:"User,omitempty"`

	// work dir
	// Required: true
	WorkDir string `json:"WorkDir"`

	// rootfs
	Rootfs *PluginConfigRootfs `json:"rootfs,omitempty"`
}

PluginConfig The config of a plugin. swagger:model PluginConfig

type PluginConfigArgs

type PluginConfigArgs struct {

	// description
	// Required: true
	Description string `json:"Description"`

	// name
	// Required: true
	Name string `json:"Name"`

	// settable
	// Required: true
	Settable []string `json:"Settable"`

	// value
	// Required: true
	Value []string `json:"Value"`
}

PluginConfigArgs plugin config args swagger:model PluginConfigArgs

type PluginConfigInterface

type PluginConfigInterface struct {

	// Protocol to use for clients connecting to the plugin.
	ProtocolScheme string `json:"ProtocolScheme,omitempty"`

	// socket
	// Required: true
	Socket string `json:"Socket"`

	// types
	// Required: true
	Types []PluginInterfaceType `json:"Types"`
}

PluginConfigInterface The interface between Docker and the plugin swagger:model PluginConfigInterface

type PluginConfigLinux

type PluginConfigLinux struct {

	// allow all devices
	// Required: true
	AllowAllDevices bool `json:"AllowAllDevices"`

	// capabilities
	// Required: true
	Capabilities []string `json:"Capabilities"`

	// devices
	// Required: true
	Devices []PluginDevice `json:"Devices"`
}

PluginConfigLinux plugin config linux swagger:model PluginConfigLinux

type PluginConfigNetwork

type PluginConfigNetwork struct {

	// type
	// Required: true
	Type string `json:"Type"`
}

PluginConfigNetwork plugin config network swagger:model PluginConfigNetwork

type PluginConfigRootfs

type PluginConfigRootfs struct {

	// diff ids
	DiffIds []string `json:"diff_ids"`

	// type
	Type string `json:"type,omitempty"`
}

PluginConfigRootfs plugin config rootfs swagger:model PluginConfigRootfs

type PluginConfigUser

type PluginConfigUser struct {

	// g ID
	GID uint32 `json:"GID,omitempty"`

	// UID
	UID uint32 `json:"UID,omitempty"`
}

PluginConfigUser plugin config user swagger:model PluginConfigUser

type PluginCreateOptions

type PluginCreateOptions struct {
	RepoName string
}

PluginCreateOptions hold all options to plugin create.

type PluginDevice

type PluginDevice struct {

	// description
	// Required: true
	Description string `json:"Description"`

	// name
	// Required: true
	Name string `json:"Name"`

	// path
	// Required: true
	Path *string `json:"Path"`

	// settable
	// Required: true
	Settable []string `json:"Settable"`
}

PluginDevice plugin device swagger:model PluginDevice

type PluginDisableOptions

type PluginDisableOptions struct {
	Force bool
}

PluginDisableOptions holds parameters to disable plugins.

type PluginEnableOptions

type PluginEnableOptions struct {
	Timeout int
}

PluginEnableOptions holds parameters to enable plugins.

type PluginEnv

type PluginEnv struct {

	// description
	// Required: true
	Description string `json:"Description"`

	// name
	// Required: true
	Name string `json:"Name"`

	// settable
	// Required: true
	Settable []string `json:"Settable"`

	// value
	// Required: true
	Value *string `json:"Value"`
}

PluginEnv plugin env swagger:model PluginEnv

type PluginInstallOptions

type PluginInstallOptions struct {
	Disabled              bool
	AcceptAllPermissions  bool
	RegistryAuth          string // RegistryAuth is the base64 encoded credentials for the registry
	RemoteRef             string // RemoteRef is the plugin name on the registry
	PrivilegeFunc         RequestPrivilegeFunc
	AcceptPermissionsFunc func(PluginPrivileges) (bool, error)
	Args                  []string
}

PluginInstallOptions holds parameters to install a plugin.

type PluginInterfaceType

type PluginInterfaceType struct {

	// capability
	// Required: true
	Capability string `json:"Capability"`

	// prefix
	// Required: true
	Prefix string `json:"Prefix"`

	// version
	// Required: true
	Version string `json:"Version"`
}

PluginInterfaceType plugin interface type swagger:model PluginInterfaceType

func (*PluginInterfaceType) MarshalJSON

func (t *PluginInterfaceType) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler for PluginInterfaceType

func (PluginInterfaceType) String

func (t PluginInterfaceType) String() string

String implements fmt.Stringer for PluginInterfaceType

func (*PluginInterfaceType) UnmarshalJSON

func (t *PluginInterfaceType) UnmarshalJSON(p []byte) error

UnmarshalJSON implements json.Unmarshaler for PluginInterfaceType

type PluginMount

type PluginMount struct {

	// description
	// Required: true
	Description string `json:"Description"`

	// destination
	// Required: true
	Destination string `json:"Destination"`

	// name
	// Required: true
	Name string `json:"Name"`

	// options
	// Required: true
	Options []string `json:"Options"`

	// settable
	// Required: true
	Settable []string `json:"Settable"`

	// source
	// Required: true
	Source *string `json:"Source"`

	// type
	// Required: true
	Type string `json:"Type"`
}

PluginMount plugin mount swagger:model PluginMount

type PluginPrivilege

type PluginPrivilege struct {
	Name        string
	Description string
	Value       []string
}

PluginPrivilege describes a permission the user has to accept upon installing a plugin.

type PluginPrivileges

type PluginPrivileges []PluginPrivilege

PluginPrivileges is a list of PluginPrivilege

func (PluginPrivileges) Len

func (s PluginPrivileges) Len() int

func (PluginPrivileges) Less

func (s PluginPrivileges) Less(i, j int) bool

func (PluginPrivileges) Swap

func (s PluginPrivileges) Swap(i, j int)

type PluginRemoveOptions

type PluginRemoveOptions struct {
	Force bool
}

PluginRemoveOptions holds parameters to remove plugins.

type PluginSettings

type PluginSettings struct {

	// args
	// Required: true
	Args []string `json:"Args"`

	// devices
	// Required: true
	Devices []PluginDevice `json:"Devices"`

	// env
	// Required: true
	Env []string `json:"Env"`

	// mounts
	// Required: true
	Mounts []PluginMount `json:"Mounts"`
}

PluginSettings Settings that can be modified by users. swagger:model PluginSettings

type PluginsInfo deprecated

type PluginsInfo = system.PluginsInfo

PluginsInfo is a temp struct holding Plugins name registered with docker daemon. It is used by system.Info struct

Deprecated: use system.PluginsInfo.

type PluginsListResponse

type PluginsListResponse []*Plugin

PluginsListResponse contains the response for the Engine API

type Port

type Port struct {

	// Host IP address that the container's port is mapped to
	IP string `json:"IP,omitempty"`

	// Port on the container
	// Required: true
	PrivatePort uint16 `json:"PrivatePort"`

	// Port exposed on the host
	PublicPort uint16 `json:"PublicPort,omitempty"`

	// type
	// Required: true
	Type string `json:"Type"`
}

Port An open port on a container swagger:model Port

type PushResult

type PushResult struct {
	Tag    string
	Digest string
	Size   int
}

PushResult contains the tag, manifest digest, and manifest size from the push. It's used to signal this information to the trust code in the client so it can sign the manifest if necessary.

type RequestPrivilegeFunc

type RequestPrivilegeFunc func() (string, error)

RequestPrivilegeFunc is a function interface that clients can supply to retry operations after getting an authorization error. This function returns the registry authentication header value in base 64 format, or an error if the privilege request fails.

type ResizeOptions deprecated

type ResizeOptions = container.ResizeOptions

ResizeOptions holds parameters to resize a TTY. It can be used to resize container TTYs and exec process TTYs too.

Deprecated: use container.ResizeOptions.

type RootFS

type RootFS struct {
	Type   string   `json:",omitempty"`
	Layers []string `json:",omitempty"`
}

RootFS returns Image's RootFS description including the layer IDs.

type Runtime deprecated

type Runtime = system.Runtime

Runtime describes an OCI runtime.

Deprecated: use system.Runtime.

type SecretCreateResponse

type SecretCreateResponse struct {
	// ID is the id of the created secret.
	ID string
}

SecretCreateResponse contains the information returned to a client on the creation of a new secret.

type SecretListOptions

type SecretListOptions struct {
	Filters filters.Args
}

SecretListOptions holds parameters to list secrets

type SecurityOpt deprecated

type SecurityOpt = system.SecurityOpt

SecurityOpt contains the name and options of a security option.

Deprecated: use system.SecurityOpt.

type ServiceCreateOptions

type ServiceCreateOptions struct {
	// EncodedRegistryAuth is the encoded registry authorization credentials to
	// use when updating the service.
	//
	// This field follows the format of the X-Registry-Auth header.
	EncodedRegistryAuth string

	// QueryRegistry indicates whether the service update requires
	// contacting a registry. A registry may be contacted to retrieve
	// the image digest and manifest, which in turn can be used to update
	// platform or other information about the service.
	QueryRegistry bool
}

ServiceCreateOptions contains the options to use when creating a service.

type ServiceCreateResponse deprecated

type ServiceCreateResponse = swarm.ServiceCreateResponse

ServiceCreateResponse contains the information returned to a client on the creation of a new service.

Deprecated: use swarm.ServiceCreateResponse.

type ServiceInspectOptions

type ServiceInspectOptions struct {
	InsertDefaults bool
}

ServiceInspectOptions holds parameters related to the "service inspect" operation.

type ServiceListOptions

type ServiceListOptions struct {
	Filters filters.Args

	// Status indicates whether the server should include the service task
	// count of running and desired tasks.
	Status bool
}

ServiceListOptions holds parameters to list services with.

type ServiceUpdateOptions

type ServiceUpdateOptions struct {
	// EncodedRegistryAuth is the encoded registry authorization credentials to
	// use when updating the service.
	//
	// This field follows the format of the X-Registry-Auth header.
	EncodedRegistryAuth string

	// RegistryAuthFrom specifies where to find the registry authorization
	// credentials if they are not given in EncodedRegistryAuth. Valid
	// values are "spec" and "previous-spec".
	RegistryAuthFrom string

	// Rollback indicates whether a server-side rollback should be
	// performed. When this is set, the provided spec will be ignored.
	// The valid values are "previous" and "none". An empty value is the
	// same as "none".
	Rollback string

	// QueryRegistry indicates whether the service update requires
	// contacting a registry. A registry may be contacted to retrieve
	// the image digest and manifest, which in turn can be used to update
	// platform or other information about the service.
	QueryRegistry bool
}

ServiceUpdateOptions contains the options to be used for updating services.

type ServiceUpdateResponse deprecated

type ServiceUpdateResponse = swarm.ServiceUpdateResponse

ServiceUpdateResponse service update response.

Deprecated: use swarm.ServiceUpdateResponse.

type Stats

type Stats struct {
	// Common stats
	Read    time.Time `json:"read"`
	PreRead time.Time `json:"preread"`

	// Linux specific stats, not populated on Windows.
	PidsStats  PidsStats  `json:"pids_stats,omitempty"`
	BlkioStats BlkioStats `json:"blkio_stats,omitempty"`

	// Windows specific stats, not populated on Linux.
	NumProcs     uint32       `json:"num_procs"`
	StorageStats StorageStats `json:"storage_stats,omitempty"`

	// Shared stats
	CPUStats    CPUStats    `json:"cpu_stats,omitempty"`
	PreCPUStats CPUStats    `json:"precpu_stats,omitempty"` // "Pre"="Previous"
	MemoryStats MemoryStats `json:"memory_stats,omitempty"`
}

Stats is Ultimate struct aggregating all types of stats of one container

type StatsJSON

type StatsJSON struct {
	Stats

	Name string `json:"name,omitempty"`
	ID   string `json:"id,omitempty"`

	// Networks request version >=1.21
	Networks map[string]NetworkStats `json:"networks,omitempty"`
}

StatsJSON is newly used Networks

type StorageStats

type StorageStats struct {
	ReadCountNormalized  uint64 `json:"read_count_normalized,omitempty"`
	ReadSizeBytes        uint64 `json:"read_size_bytes,omitempty"`
	WriteCountNormalized uint64 `json:"write_count_normalized,omitempty"`
	WriteSizeBytes       uint64 `json:"write_size_bytes,omitempty"`
}

StorageStats is the disk I/O stats for read/write on Windows.

type SummaryNetworkSettings

type SummaryNetworkSettings struct {
	Networks map[string]*network.EndpointSettings
}

SummaryNetworkSettings provides a summary of container's networks in /containers/json

type SwarmUnlockKeyResponse

type SwarmUnlockKeyResponse struct {
	// UnlockKey is the unlock key in ASCII-armored format.
	UnlockKey string
}

SwarmUnlockKeyResponse contains the response for Engine API: GET /swarm/unlockkey

type TaskListOptions

type TaskListOptions struct {
	Filters filters.Args
}

TaskListOptions holds parameters to list tasks with.

type ThrottlingData

type ThrottlingData struct {
	// Number of periods with throttling active
	Periods uint64 `json:"periods"`
	// Number of periods when the container hits its throttling limit.
	ThrottledPeriods uint64 `json:"throttled_periods"`
	// Aggregate time the container was throttled for in nanoseconds.
	ThrottledTime uint64 `json:"throttled_time"`
}

ThrottlingData stores CPU throttling stats of one running container. Not used on Windows.

type Version

type Version struct {
	Platform   struct{ Name string } `json:",omitempty"`
	Components []ComponentVersion    `json:",omitempty"`

	Version       string
	APIVersion    string `json:"ApiVersion"`
	MinAPIVersion string `json:"MinAPIVersion,omitempty"`
	GitCommit     string
	GoVersion     string
	Os            string
	Arch          string
	KernelVersion string `json:",omitempty"`
	Experimental  bool   `json:",omitempty"`
	BuildTime     string `json:",omitempty"`
}

Version contains response of Engine API: GET "/version"

type VolumesPruneReport

type VolumesPruneReport struct {
	VolumesDeleted []string
	SpaceReclaimed uint64
}

VolumesPruneReport contains the response for Engine API: POST "/volumes/prune"

Directories

Path Synopsis
Package backend includes types to send information to server backends.
Package backend includes types to send information to server backends.
Package filters provides tools for encoding a mapping of keys to a set of multiple values.
Package filters provides tools for encoding a mapping of keys to a set of multiple values.
plugins
v1p19
Package v1p19 provides specific API types for the API version 1, patch 19.
Package v1p19 provides specific API types for the API version 1, patch 19.
v1p20
Package v1p20 provides specific API types for the API version 1, patch 20.
Package v1p20 provides specific API types for the API version 1, patch 20.

Jump to

Keyboard shortcuts

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