Documentation ¶
Overview ¶
Package types is used for API stability in the types and response to the consumers of the API stats endpoint.
Index ¶
- Constants
- type Action
- type Arch
- type Architecture
- type Arg
- type AuthConfig
- type AuthResponse
- type BlkioStatEntry
- type BlkioStats
- type CPUStats
- type CPUUsage
- type Checkpoint
- type CheckpointCreateOptions
- type CloseWriter
- type Container
- type ContainerAttachOptions
- type ContainerChange
- type ContainerCommitConfig
- type ContainerCommitOptions
- type ContainerCommitResponse
- type ContainerCreateConfig
- type ContainerCreateResponse
- type ContainerExecCreateResponse
- type ContainerExecInspect
- type ContainerJSON
- type ContainerJSONBase
- type ContainerListOptions
- type ContainerLogsOptions
- type ContainerNode
- type ContainerPathStat
- type ContainerProcessList
- type ContainerRemoveOptions
- type ContainerRmConfig
- type ContainerStartOptions
- type ContainerState
- type ContainerStats
- type ContainerUpdateResponse
- type ContainerWaitResponse
- type CopyConfig
- type CopyToContainerOptions
- type DefaultNetworkSettings
- type EndpointResource
- type ErrorResponse
- type EventsOptions
- type ExecConfig
- type ExecStartCheck
- type Filter
- type GraphDriverData
- type Health
- type HealthcheckResult
- type HijackedResponse
- type Image
- type ImageBuildOptions
- type ImageBuildResponse
- type ImageCreateOptions
- type ImageDelete
- type ImageHistory
- type ImageImportOptions
- type ImageImportSource
- type ImageInspect
- type ImageListOptions
- type ImageLoadResponse
- type ImagePullOptions
- type ImagePushOptions
- type ImageRemoveOptions
- type ImageSearchOptions
- type Info
- type MemoryStats
- type MountPoint
- type NetworkConnect
- type NetworkCreate
- type NetworkCreateRequest
- type NetworkCreateResponse
- type NetworkDisconnect
- type NetworkListOptions
- type NetworkResource
- type NetworkSettings
- type NetworkSettingsBase
- type NetworkStats
- type NodeListOptions
- type NodeRemoveOptions
- type Operator
- type PidsStats
- type Plugin
- type PluginArgs
- type PluginConfig
- type PluginDevice
- type PluginEnv
- type PluginInstallOptions
- type PluginInterface
- type PluginInterfaceType
- type PluginManifest
- type PluginMount
- type PluginNetwork
- type PluginPrivilege
- type PluginPrivileges
- type PluginRemoveOptions
- type PluginRmConfig
- type PluginSetting
- type PluginUser
- type PluginsInfo
- type PluginsListResponse
- type Port
- type RequestPrivilegeFunc
- type ResizeOptions
- type RootFS
- type Runtime
- type Seccomp
- type ServiceCreateOptions
- type ServiceCreateResponse
- type ServiceListOptions
- type ServiceUpdateOptions
- type Stats
- type StatsJSON
- type StorageStats
- type SummaryNetworkSettings
- type Syscall
- type TaskListOptions
- type ThrottlingData
- type Version
- type VersionResponse
- type Volume
- type VolumeCreateRequest
- type VolumesListResponse
Constants ¶
const ( 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 ¶
This section is empty.
Types ¶
type Arch ¶
type Arch string
Arch used for architectures
const ( ArchX86 Arch = "SCMP_ARCH_X86" ArchX86_64 Arch = "SCMP_ARCH_X86_64" ArchX32 Arch = "SCMP_ARCH_X32" ArchARM Arch = "SCMP_ARCH_ARM" ArchAARCH64 Arch = "SCMP_ARCH_AARCH64" ArchMIPS Arch = "SCMP_ARCH_MIPS" ArchMIPS64 Arch = "SCMP_ARCH_MIPS64" ArchMIPS64N32 Arch = "SCMP_ARCH_MIPS64N32" ArchMIPSEL Arch = "SCMP_ARCH_MIPSEL" ArchMIPSEL64 Arch = "SCMP_ARCH_MIPSEL64" ArchMIPSEL64N32 Arch = "SCMP_ARCH_MIPSEL64N32" ArchPPC Arch = "SCMP_ARCH_PPC" ArchPPC64 Arch = "SCMP_ARCH_PPC64" ArchPPC64LE Arch = "SCMP_ARCH_PPC64LE" ArchS390 Arch = "SCMP_ARCH_S390" ArchS390X Arch = "SCMP_ARCH_S390X" )
Additional architectures permitted to be used for system calls By default only the native architecture of the kernel is permitted
type Architecture ¶
type Architecture struct { Arch Arch `json:"architecture"` SubArches []Arch `json:"subArchitectures"` }
Architecture is used to represent an specific architecture and its sub-architectures
type Arg ¶
type Arg struct { Index uint `json:"index"` Value uint64 `json:"value"` ValueTwo uint64 `json:"valueTwo"` Op Operator `json:"op"` }
Arg used for matching specific syscall arguments in Seccomp
type AuthConfig ¶
type AuthConfig struct { Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` Auth string `json:"auth,omitempty"` // Email is an optional value associated with the username. // This field is deprecated and will be removed in a later // version of docker. Email string `json:"email,omitempty"` ServerAddress string `json:"serveraddress,omitempty"` // IdentityToken is used to authenticate the user and get // an access token for the registry. IdentityToken string `json:"identitytoken,omitempty"` // RegistryToken is a bearer token to be sent to a registry RegistryToken string `json:"registrytoken,omitempty"` }
AuthConfig contains authorization information for connecting to a Registry
type AuthResponse ¶
type AuthResponse struct { // Status is the authentication status Status string `json:"Status"` // IdentityToken is an opaque token used for authenticating // a user after a successful login. IdentityToken string `json:"IdentityToken,omitempty"` }
AuthResponse contains response of Remote API: POST "/auth"
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 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"` // 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 ¶
type Checkpoint struct {
Name string // Name is the name of the checkpoint
}
Checkpoint represents the details of a checkpoint
type CheckpointCreateOptions ¶
CheckpointCreateOptions holds parameters to create a checkpoint from a container
type CloseWriter ¶
type CloseWriter interface {
CloseWrite() error
}
CloseWriter is an interface that implements structs that close input streams to prevent from writing.
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 Remote API: GET "/containers/json"
type ContainerAttachOptions ¶
type ContainerAttachOptions struct { Stream bool Stdin bool Stdout bool Stderr bool DetachKeys string }
ContainerAttachOptions holds parameters to attach to a container.
type ContainerChange ¶
ContainerChange contains response of Remote API: GET "/containers/{name:.*}/changes"
type ContainerCommitConfig ¶
type ContainerCommitConfig struct { Pause bool Repo string Tag string Author string Comment string // merge container config into commit config before commit MergeConfigs bool Config *container.Config }
ContainerCommitConfig contains build configs for commit operation, and is used when making a commit with the current state of the container.
type ContainerCommitOptions ¶
type ContainerCommitOptions struct { Reference string Comment string Author string Changes []string Pause bool Config *container.Config }
ContainerCommitOptions holds parameters to commit changes into a container.
type ContainerCommitResponse ¶
type ContainerCommitResponse struct {
ID string `json:"Id"`
}
ContainerCommitResponse contains response of Remote API: POST "/commit?container="+containerID
type ContainerCreateConfig ¶
type ContainerCreateConfig struct { Name string Config *container.Config HostConfig *container.HostConfig NetworkingConfig *network.NetworkingConfig }
ContainerCreateConfig is the parameter set to ContainerCreate()
type ContainerCreateResponse ¶
type ContainerCreateResponse struct { // ID is the ID of the created container. ID string `json:"Id"` // Warnings are any warnings encountered during the creation of the container. Warnings []string `json:"Warnings"` }
ContainerCreateResponse contains the information returned to a client on the creation of a new container.
type ContainerExecCreateResponse ¶
type ContainerExecCreateResponse struct { // ID is the exec ID. ID string `json:"Id"` }
ContainerExecCreateResponse contains response of Remote API: POST "/containers/{name:.*}/exec"
type ContainerExecInspect ¶
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"` Name string RestartCount int Driver 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 Remote API: GET "/containers/{name:.*}/json"
type ContainerListOptions ¶
type ContainerListOptions struct { Quiet bool Size bool All bool Latest bool Since string Before string Limit int Filter filters.Args }
ContainerListOptions holds parameters to list containers with.
type ContainerLogsOptions ¶
type ContainerLogsOptions struct { ShowStdout bool ShowStderr bool Since string Timestamps bool Follow bool Tail string Details bool }
ContainerLogsOptions holds parameters to filter logs with.
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 available in Docker Swarm
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 ContainerProcessList ¶
ContainerProcessList contains response of Remote API: GET "/containers/{name:.*}/top"
type ContainerRemoveOptions ¶
ContainerRemoveOptions holds parameters to remove containers.
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 ContainerStartOptions ¶
type ContainerStartOptions struct {
CheckpointID string
}
ContainerStartOptions holds parameters to start containers.
type ContainerState ¶
type ContainerState struct { Status string 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 resonse of Remote API: GET "/stats"
type ContainerUpdateResponse ¶
type ContainerUpdateResponse struct { // Warnings are any warnings encountered during the updating of the container. Warnings []string `json:"Warnings"` }
ContainerUpdateResponse contains response of Remote API: POST "/containers/{name:.*}/update"
type ContainerWaitResponse ¶
type ContainerWaitResponse struct { // StatusCode is the status code of the wait job StatusCode int `json:"StatusCode"` }
ContainerWaitResponse contains response of Remote API: POST "/containers/"+containerID+"/wait"
type CopyConfig ¶
type CopyConfig struct {
Resource string
}
CopyConfig contains request body of Remote API: POST "/containers/"+containerID+"/copy"
type CopyToContainerOptions ¶
type CopyToContainerOptions struct {
AllowOverwriteDirWithFile 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 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 {
Message string `json:"message"`
}
ErrorResponse is the response body of API errors.
type EventsOptions ¶
EventsOptions hold 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. 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 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 }
ExecStartCheck is a temp struct used by execStart Config fields is part of ExecConfig in runconfig package
type Filter ¶
type Filter struct { Caps []string `json:"caps,omitempty"` Arches []string `json:"arches,omitempty"` }
Filter is used to conditionally apply Seccomp rules
type GraphDriverData ¶
GraphDriverData returns Image's graph driver config info when calling inspect command
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 ¶
HijackedResponse holds connection information for a hijacked request.
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.
type Image ¶
type Image struct { ID string `json:"Id"` ParentID string `json:"ParentId"` RepoTags []string RepoDigests []string Created int64 Size int64 VirtualSize int64 Labels map[string]string }
Image contains response of Remote API: GET "/images/json"
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 CPUQuota int64 CPUPeriod int64 Memory int64 MemorySwap int64 CgroupParent string ShmSize int64 Dockerfile string Ulimits []*units.Ulimit BuildArgs map[string]string AuthConfigs map[string]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 }
ImageBuildOptions holds the information necessary to build images.
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
}
ImageCreateOptions holds information to create images.
type ImageDelete ¶
ImageDelete contains response of Remote API: DELETE "/images/{name:.*}"
type ImageHistory ¶
type ImageHistory struct { ID string `json:"Id"` Created int64 CreatedBy string Tags []string Size int64 Comment string }
ImageHistory contains response of Remote API: GET "/images/{name:.*}/history"
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 }
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 (mutually exclusive with SourceName) SourceName string // SourceName is the name of the image to pull (mutually exclusive with Source) }
ImageImportSource holds source information for ImageImport
type ImageInspect ¶
type ImageInspect struct { ID string `json:"Id"` RepoTags []string RepoDigests []string Parent string Comment string Created string Container string ContainerConfig *container.Config DockerVersion string Author string Config *container.Config Architecture string Os string Size int64 VirtualSize int64 GraphDriver GraphDriverData RootFS RootFS }
ImageInspect contains response of Remote API: GET "/images/{name:.*}/json"
type ImageListOptions ¶
ImageListOptions holds parameters to filter the list of 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 ImagePullOptions ¶
type ImagePullOptions struct { All bool RegistryAuth string // RegistryAuth is the base64 encoded credentials for the registry PrivilegeFunc RequestPrivilegeFunc }
ImagePullOptions holds information to pull images.
type ImagePushOptions ¶
type ImagePushOptions ImagePullOptions
ImagePushOptions holds information to push images.
type ImageRemoveOptions ¶
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 Info ¶
type Info struct { ID string Containers int ContainersRunning int ContainersPaused int ContainersStopped int Images int Driver string DriverStatus [][2]string SystemStatus [][2]string Plugins PluginsInfo MemoryLimit bool SwapLimit bool KernelMemory bool CPUCfsPeriod bool `json:"CpuCfsPeriod"` CPUCfsQuota bool `json:"CpuCfsQuota"` CPUSet bool IPv4Forwarding bool BridgeNfIptables bool BridgeNfIP6tables bool `json:"BridgeNfIp6tables"` Debug bool NFd int OomKillDisable bool NGoroutines int SystemTime string LoggingDriver string CgroupDriver string NEventsListener int KernelVersion string OperatingSystem string OSType string Architecture string IndexServerAddress string RegistryConfig *registry.ServiceConfig NCPU int MemTotal int64 DockerRootDir string HTTPProxy string `json:"HttpProxy"` HTTPSProxy string `json:"HttpsProxy"` NoProxy string Name string Labels []string ExperimentalBuild bool ServerVersion string ClusterStore string ClusterAdvertise string SecurityOptions []string Runtimes map[string]Runtime DefaultRuntime string Swarm swarm.Info // LiveRestoreEnabled determines whether containers should be kept // running when the daemon is shutdown or upon daemon start if // running containers are detected LiveRestoreEnabled bool }
Info contains response of Remote API: GET "/info"
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 mount.Type `json:",omitempty"` Name string `json:",omitempty"` Source string Destination string Driver string `json:",omitempty"` Mode string RW bool 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 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 { CheckDuplicate bool Driver string EnableIPv6 bool IPAM *network.IPAM Internal bool Attachable bool 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 ¶
NetworkCreateResponse is the response message sent by the server for network create call
type NetworkDisconnect ¶
NetworkDisconnect represents the data to be used to disconnect a container from the network
type NetworkListOptions ¶
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 Scope string // Scope describes the level at which the network exists (e.g. `global` 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. 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 }
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 is the Bridge name the network uses(e.g. `docker0`) SandboxID string // SandboxID uniquely represents a container's network stack HairpinMode bool // HairpinMode specifies if hairpin NAT should be enabled on the virtual interface LinkLocalIPv6Address string // LinkLocalIPv6Address is an IPv6 unicast address using the link-local prefix LinkLocalIPv6PrefixLen int // LinkLocalIPv6PrefixLen is the prefix length of an IPv6 unicast address Ports nat.PortMap // Ports is a collection of PortBinding indexed by Port SandboxKey string // SandboxKey identifies the sandbox SecondaryIPAddresses []network.Address SecondaryIPv6Addresses []network.Address }
NetworkSettingsBase holds basic information about networks
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 dont `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 dont `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 NodeListOptions ¶
NodeListOptions holds parameters to list nodes with.
type NodeRemoveOptions ¶
type NodeRemoveOptions struct {
Force bool
}
NodeRemoveOptions holds parameters to remove nodes with.
type Operator ¶
type Operator string
Operator used to match syscall arguments in Seccomp
const ( OpNotEqual Operator = "SCMP_CMP_NE" OpLessThan Operator = "SCMP_CMP_LT" OpLessEqual Operator = "SCMP_CMP_LE" OpEqualTo Operator = "SCMP_CMP_EQ" OpGreaterEqual Operator = "SCMP_CMP_GE" OpGreaterThan Operator = "SCMP_CMP_GT" OpMaskedEqual Operator = "SCMP_CMP_MASKED_EQ" )
Define operators for syscall arguments in Seccomp
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 Plugin ¶
type Plugin struct { ID string `json:"Id,omitempty"` Name string Tag string // Enabled is true when the plugin is running, is false when the plugin is not running, only installed. Enabled bool Config PluginConfig Manifest PluginManifest }
Plugin represents a Docker plugin for the remote API
type PluginArgs ¶
type PluginArgs struct { PluginSetting Value []string }
PluginArgs represents the command line arguments for a plugin
type PluginConfig ¶
type PluginConfig struct { Mounts []PluginMount Env []string Args []string Devices []PluginDevice }
PluginConfig represents the values of settings potentially modifiable by a user
type PluginDevice ¶
type PluginDevice struct { PluginSetting Path *string }
PluginDevice represents a device for a plugin
type PluginEnv ¶
type PluginEnv struct { PluginSetting Value *string }
PluginEnv represents an environment variable for a plugin
type PluginInstallOptions ¶
type PluginInstallOptions struct { Disabled bool AcceptAllPermissions bool RegistryAuth string // RegistryAuth is the base64 encoded credentials for the registry PrivilegeFunc RequestPrivilegeFunc AcceptPermissionsFunc func(PluginPrivileges) (bool, error) }
PluginInstallOptions holds parameters to install a plugin.
type PluginInterface ¶
type PluginInterface struct { Types []PluginInterfaceType Socket string }
PluginInterface describes the interface between Docker and plugin
type PluginInterfaceType ¶
type PluginInterfaceType struct { Prefix string // This is always "docker" Capability string // Capability should be validated against the above list. Version string // Plugin API version. Depends on the capability }
PluginInterfaceType represents a type that a plugin implements.
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 PluginManifest ¶
type PluginManifest struct { ManifestVersion string Description string Documentation string Interface PluginInterface Entrypoint []string Workdir string User PluginUser `json:",omitempty"` Network PluginNetwork Capabilities []string Mounts []PluginMount Devices []PluginDevice Env []PluginEnv Args PluginArgs }
PluginManifest represents the manifest of a plugin
type PluginMount ¶
type PluginMount struct { PluginSetting Source *string Destination string Type string Options []string }
PluginMount represents the mount configuration for a plugin
type PluginNetwork ¶
type PluginNetwork struct {
Type string
}
PluginNetwork represents the network configuration for a plugin
type PluginPrivilege ¶
PluginPrivilege describes a permission the user has to accept upon installing a plugin.
type PluginPrivileges ¶
type PluginPrivileges []PluginPrivilege
PluginPrivileges is a list of PluginPrivilege
type PluginRemoveOptions ¶
type PluginRemoveOptions struct {
Force bool
}
PluginRemoveOptions holds parameters to remove plugins.
type PluginRmConfig ¶
type PluginRmConfig struct {
ForceRemove bool
}
PluginRmConfig holds arguments for the plugin remove operation. This struct is used to tell the backend what operations to perform.
type PluginSetting ¶
PluginSetting is to be embedded in other structs, if they are supposed to be modifiable by the user.
type PluginUser ¶
PluginUser represents the user for the plugin's process
type PluginsInfo ¶
type PluginsInfo struct { // List of Volume plugins registered Volume []string // List of Network plugins registered Network []string // List of Authorization plugins registered Authorization []string }
PluginsInfo is a temp struct holding Plugins name registered with docker daemon. It is used by Info struct
type PluginsListResponse ¶
type PluginsListResponse []*Plugin
PluginsListResponse contains the response for the remote API
type Port ¶
type Port struct { IP string `json:",omitempty"` PrivatePort int PublicPort int `json:",omitempty"` Type string }
Port stores open ports info of container e.g. {"PrivatePort": 8080, "PublicPort": 80, "Type": "tcp"}
type RequestPrivilegeFunc ¶
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 ¶
ResizeOptions holds parameters to resize a tty. It can be used to resize container ttys and exec process ttys too.
type RootFS ¶
type RootFS struct { Type string Layers []string `json:",omitempty"` BaseLayer string `json:",omitempty"` }
RootFS returns Image's RootFS description including the layer IDs.
type Seccomp ¶
type Seccomp struct { DefaultAction Action `json:"defaultAction"` // Architectures is kept to maintain backward compatibility with the old // seccomp profile. Architectures []Arch `json:"architectures,omitempty"` ArchMap []Architecture `json:"archMap,omitempty"` Syscalls []*Syscall `json:"syscalls"` }
Seccomp represents the config for a seccomp profile for syscall restriction.
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 }
ServiceCreateOptions contains the options to use when creating a service.
type ServiceCreateResponse ¶
type ServiceCreateResponse struct { // ID is the ID of the created service. ID string }
ServiceCreateResponse contains the information returned to a client on the creation of a new service.
type ServiceListOptions ¶
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 }
ServiceUpdateOptions contains the options to be used for updating services.
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 // 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 Syscall ¶
type Syscall struct { Name string `json:"name,omitempty"` Names []string `json:"names,omitempty"` Action Action `json:"action"` Args []*Arg `json:"args"` Comment string `json:"comment"` Includes Filter `json:"includes"` Excludes Filter `json:"excludes"` }
Syscall is used to match a group of syscalls in Seccomp
type TaskListOptions ¶
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 { Version string APIVersion string `json:"ApiVersion"` GitCommit string GoVersion string Os string Arch string KernelVersion string `json:",omitempty"` Experimental bool `json:",omitempty"` BuildTime string `json:",omitempty"` }
Version contains response of Remote API: GET "/version"
type VersionResponse ¶
VersionResponse holds version information for the client and the server
func (VersionResponse) ServerOK ¶
func (v VersionResponse) ServerOK() bool
ServerOK returns true when the client could connect to the docker server and parse the information received. It returns false otherwise.
type Volume ¶
type Volume struct { Name string // Name is the name of the volume Driver string // Driver is the Driver name used to create the volume Mountpoint string // Mountpoint is the location on disk of the volume Status map[string]interface{} `json:",omitempty"` // Status provides low-level status information about the volume Labels map[string]string // Labels is metadata specific to the volume Scope string // Scope describes the level at which the volume exists (e.g. `global` for cluster-wide or `local` for machine level) }
Volume represents the configuration of a volume for the remote API
type VolumeCreateRequest ¶
type VolumeCreateRequest struct { Name string // Name is the requested name of the volume Driver string // Driver is the name of the driver that should be used to create the volume DriverOpts map[string]string // DriverOpts holds the driver specific options to use for when creating the volume. Labels map[string]string // Labels holds metadata specific to the volume being created. }
VolumeCreateRequest contains the response for the remote API: POST "/volumes/create"
type VolumesListResponse ¶
type VolumesListResponse struct { Volumes []*Volume // Volumes is the list of volumes being returned Warnings []string // Warnings is a list of warnings that occurred when getting the list from the volume drivers }
VolumesListResponse contains the response for the remote API: GET "/volumes"
Source Files ¶
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 helper function to parse and handle command line filter, used for example in docker ps or docker images commands.
|
Package filters provides helper function to parse and handle command line filter, used for example in docker ps or docker images commands. |
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. |