types

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2016 License: Apache-2.0 Imports: 11 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action added in v0.2.0

type Action string

Action taken upon Seccomp rule match

const (
	ActKill  Action = "SCMP_ACT_KILL"
	ActTrap  Action = "SCMP_ACT_TRAP"
	ActErrno Action = "SCMP_ACT_ERRNO"
	ActTrace Action = "SCMP_ACT_TRACE"
	ActAllow Action = "SCMP_ACT_ALLOW"
)

Define actions for Seccomp rules

type Arch added in v0.2.0

type Arch string

Arch used for additional 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"
)

Additional architectures permitted to be used for system calls By default only the native architecture of the kernel is permitted

type Arg added in v0.2.0

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 TODO Windows: This can be factored out

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 TODO Windows: This can be factored out

type CPUStats

type CPUStats struct {
	CPUUsage       CPUUsage       `json:"cpu_usage"`
	SystemUsage    uint64         `json:"system_cpu_usage"`
	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.
	TotalUsage uint64 `json:"total_usage"`
	// Total CPU time consumed per core.
	// Units: nanoseconds.
	PercpuUsage []uint64 `json:"percpu_usage"`
	// Time spent by tasks of the cgroup in kernel mode.
	// Units: nanoseconds.
	UsageInKernelmode uint64 `json:"usage_in_kernelmode"`
	// Time spent by tasks of the cgroup in user mode.
	// Units: nanoseconds.
	UsageInUsermode uint64 `json:"usage_in_usermode"`
}

CPUUsage stores All CPU stats aggregated since container inception.

type CloseWriter

type CloseWriter interface {
	CloseWrite() error
}

CloseWriter is an interface that implement 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 {
	ContainerID string
	Stream      bool
	Stdin       bool
	Stdout      bool
	Stderr      bool
	DetachKeys  string
}

ContainerAttachOptions holds parameters to attach to a container.

type ContainerChange

type ContainerChange struct {
	Kind int
	Path string
}

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 {
	ContainerID    string
	RepositoryName string
	Tag            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
	AdjustCPUShares  bool
}

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

type ContainerExecInspect struct {
	ExecID      string
	ContainerID string
	Running     bool
	ExitCode    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
	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 {
	ContainerID string
	ShowStdout  bool
	ShowStderr  bool
	Since       string
	Timestamps  bool
	Follow      bool
	Tail        string
}

ContainerLogsOptions holds parameters to filter logs with.

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

type ContainerProcessList struct {
	Processes [][]string
	Titles    []string
}

ContainerProcessList contains response of Remote API: GET "/containers/{name:.*}/top"

type ContainerRemoveOptions

type ContainerRemoveOptions struct {
	ContainerID   string
	RemoveVolumes bool
	RemoveLinks   bool
	Force         bool
}

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 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
}

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

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 {
	ContainerID               string
	Path                      string
	Content                   io.Reader
	AllowOverwriteDirWithFile bool
}

CopyToContainerOptions holds information about files to copy into a container

type DefaultNetworkSettings

type DefaultNetworkSettings struct {
	EndpointID          string
	Gateway             string
	GlobalIPv6Address   string
	GlobalIPv6PrefixLen int
	IPAddress           string
	IPPrefixLen         int
	IPv6Gateway         string
	MacAddress          string
}

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 EventsOptions

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

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.
	Container    string   // Name of the container (to execute in)
	AttachStdin  bool     // Attach the standard input, makes possible user interaction
	AttachStderr bool     // Attach the standard output
	AttachStdout bool     // Attach the standard error
	Detach       bool     // Execute in detach mode
	DetachKeys   string   // Escape keys for detach
	Cmd          []string // Execution commands and args
}

ExecConfig is a small subset of the Config struct that hold 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 GraphDriverData

type GraphDriverData struct {
	Name string
	Data map[string]string
}

GraphDriverData returns Image's graph driver config info when calling inspect command

type HijackedResponse

type HijackedResponse struct {
	Conn   net.Conn
	Reader *bufio.Reader
}

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
	CPUShares      int64
	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
}

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 {
	Parent       string // Parent is the name of the image to pull
	Tag          string // Tag is the name to tag this image with
	RegistryAuth string // RegistryAuth is the base64 encoded credentials for the registry
}

ImageCreateOptions holds information to create images.

type ImageDelete

type ImageDelete struct {
	Untagged string `json:",omitempty"`
	Deleted  string `json:",omitempty"`
}

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 {
	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)
	RepositoryName string    // RepositoryName is the name of the repository to import this image into
	Message        string    // Message is the message to tag the image with
	Tag            string    // Tag is the name to tag this 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 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

type ImageListOptions struct {
	MatchName string
	All       bool
	Filters   filters.Args
}

ImageListOptions holds parameters to filter the list of images with.

type ImageLoadResponse

type ImageLoadResponse struct {
	Body io.ReadCloser
	JSON bool
}

ImageLoadResponse returns information to the client about a load process.

type ImagePullOptions

type ImagePullOptions struct {
	ImageID      string // ImageID is the name of the image to pull
	Tag          string // Tag is the name of the tag to be pulled
	RegistryAuth string // RegistryAuth is the base64 encoded credentials for the registry
}

ImagePullOptions holds information to pull images.

type ImagePushOptions

type ImagePushOptions ImagePullOptions

ImagePushOptions holds information to push images.

type ImageRemoveOptions

type ImageRemoveOptions struct {
	ImageID       string
	Force         bool
	PruneChildren bool
}

ImageRemoveOptions holds parameters to remove images.

type ImageSearchOptions

type ImageSearchOptions struct {
	Term         string
	RegistryAuth string
}

ImageSearchOptions holds parameters to search images with.

type ImageTagOptions

type ImageTagOptions struct {
	ImageID        string
	RepositoryName string
	Tag            string
	Force          bool
}

ImageTagOptions holds parameters to tag an image

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"`
	CPUShares          bool
	CPUSet             bool
	IPv4Forwarding     bool
	BridgeNfIptables   bool
	BridgeNfIP6tables  bool `json:"BridgeNfIp6tables"`
	Debug              bool
	NFd                int
	OomKillDisable     bool
	NGoroutines        int
	SystemTime         string
	ExecutionDriver    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
}

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

type MemoryStats

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

MemoryStats aggregates All memory stats since container inception

type MountPoint

type MountPoint struct {
	Name        string `json:",omitempty"`
	Source      string
	Destination string
	Driver      string `json:",omitempty"`
	Mode        string
	RW          bool
	Propagation string
}

MountPoint represents a mount point configuration inside the 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 {
	Name           string
	CheckDuplicate bool
	Driver         string
	EnableIPv6     bool
	IPAM           network.IPAM
	Internal       bool
	Options        map[string]string
	Labels         map[string]string
}

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

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 NetworkListOptions

type NetworkListOptions struct {
	Filters filters.Args
}

NetworkListOptions holds parameters to filter the list of networks with.

type NetworkResource

type NetworkResource struct {
	Name       string
	ID         string `json:"Id"`
	Scope      string
	Driver     string
	EnableIPv6 bool
	IPAM       network.IPAM
	Internal   bool
	Containers map[string]EndpointResource
	Options    map[string]string
	Labels     map[string]string
}

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
	SandboxID              string
	HairpinMode            bool
	LinkLocalIPv6Address   string
	LinkLocalIPv6PrefixLen int
	Ports                  nat.PortMap
	SandboxKey             string
	SecondaryIPAddresses   []network.Address
	SecondaryIPv6Addresses []network.Address
}

NetworkSettingsBase holds basic information about networks

type NetworkStats

type NetworkStats struct {
	RxBytes   uint64 `json:"rx_bytes"`
	RxPackets uint64 `json:"rx_packets"`
	RxErrors  uint64 `json:"rx_errors"`
	RxDropped uint64 `json:"rx_dropped"`
	TxBytes   uint64 `json:"tx_bytes"`
	TxPackets uint64 `json:"tx_packets"`
	TxErrors  uint64 `json:"tx_errors"`
	TxDropped uint64 `json:"tx_dropped"`
}

NetworkStats aggregates All network stats of one container TODO Windows: This will require refactoring

type Operator added in v0.2.0

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 added in v0.1.2

type PidsStats struct {
	// Current is the number of pids in the cgroup
	Current uint64 `json:"current,omitempty"`
}

PidsStats contains the stats of a container's pids

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 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 ResizeOptions

type ResizeOptions struct {
	ID     string
	Height int
	Width  int
}

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

type RootFS added in v0.3.0

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 added in v0.2.0

type Seccomp struct {
	DefaultAction Action     `json:"defaultAction"`
	Architectures []Arch     `json:"architectures"`
	Syscalls      []*Syscall `json:"syscalls"`
}

Seccomp represents the config for a seccomp profile for syscall restriction.

type Stats

type Stats struct {
	Read        time.Time   `json:"read"`
	PreCPUStats CPUStats    `json:"precpu_stats,omitempty"`
	CPUStats    CPUStats    `json:"cpu_stats,omitempty"`
	MemoryStats MemoryStats `json:"memory_stats,omitempty"`
	BlkioStats  BlkioStats  `json:"blkio_stats,omitempty"`
	PidsStats   PidsStats   `json:"pids_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 SummaryNetworkSettings

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

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

type Syscall added in v0.2.0

type Syscall struct {
	Name   string `json:"name"`
	Action Action `json:"action"`
	Args   []*Arg `json:"args"`
}

Syscall is used to match a syscall in Seccomp

type ThrottlingData

type ThrottlingData struct {
	// Number of periods with throttling active
	Periods uint64 `json:"periods"`
	// Number of periods when the container hit 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

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

type VersionResponse struct {
	Client *Version
	Server *Version
}

VersionResponse holds version information for the client and the server

func (VersionResponse) ServerOK

func (v VersionResponse) ServerOK() bool

ServerOK return 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
}

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"

Directories

Path Synopsis
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.
versions
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