dockerclient
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
Constants¶
const (// ListImagesTimeout is the timeout for the ListImages APIListImagesTimeout = 10 *time.Minute// LoadImageTimeout is the timeout for the LoadImage API. It's set// to much lower value than pullImageTimeout as it involves loading// image from either a file or STDIN calls involved.// This value is set based on benchmarking the time of loading the pause container image,// since it's currently only used to load that image. If this is to be used to load any// other image in the future, additional benchmarking will be required.// Per benchmark, 2 min is roughly 4x of the worst case (29s) across 400 image loads on// al1/al2/al2gpu/al2arm with smallest instance type available (t2.nano/a1.medium) and// burst balance = 0.LoadImageTimeout = 2 *time.Minute// RemoveImageTimeout is the timeout for the RemoveImage API.RemoveImageTimeout = 3 *time.Minute// ListContainersTimeout is the timeout for the ListContainers API.ListContainersTimeout = 10 *time.Minute// InspectContainerTimeout is the timeout for the InspectContainer API.InspectContainerTimeout = 30 *time.Second// ContainerExecCreateTimeout is the timeout for the ContainerExecCreate API.ContainerExecCreateTimeout = 1 *time.Minute// ContainerExecStartTimeout is the timeout for the ContainerExecStart API.ContainerExecStartTimeout = 1 *time.Minute// ContainerExecInspectTimeout is the timeout for the ContainerExecInspect API.ContainerExecInspectTimeout = 1 *time.Minute// StopContainerTimeout is the timeout for the StopContainer API.StopContainerTimeout = 30 *time.Second// RemoveContainerTimeout is the timeout for the RemoveContainer API.RemoveContainerTimeout = 5 *time.Minute// CreateVolumeTimeout is the timeout for CreateVolume API.CreateVolumeTimeout = 5 *time.Minute// InspectVolumeTimeout is the timeout for InspectVolume API.InspectVolumeTimeout = 5 *time.Minute// RemoveVolumeTimeout is the timeout for RemoveVolume API.RemoveVolumeTimeout = 5 *time.Minute// ListPluginsTimeout is the timeout for ListPlugins API.ListPluginsTimeout = 1 *time.Minute// StatsInactivityTimeout controls the amount of time we hold open a// connection to the Docker daemon waiting for stats data.// We set this a few seconds below our stats publishling interval (20s)// so that we can disconnect and warn the user when metrics reporting// may be impacted. This is usually caused by a over-stressed docker daemon.StatsInactivityTimeout = 18 *time.Second// DockerPullBeginTimeout is the timeout from when a 'pull' is called to when// we expect to see output on the pull progress stream. This is to work// around a docker bug which sometimes results in pulls not progressing.DockerPullBeginTimeout = 5 *time.Minute// VersionTimeout is the timeout for the Version APIVersionTimeout = 10 *time.Second// InfoTimeout is the timeout for the Info APIInfoTimeout = 10 *time.Second)
Timelimits for docker operations enforced above docker
Variables¶
var (// MinDockerAPIVersion is the min Docker API version supported by agentMinDockerAPIVersion =Version_1_21MinDockerAPIVersionMusync.Mutex)
var LoggingDriverMinimumVersion = map[LoggingDriver]DockerVersion{JSONFileDriver:Version_1_18,SyslogDriver:Version_1_18,JournaldDriver:Version_1_19,GelfDriver:Version_1_20,FluentdDriver:Version_1_20,AWSLogsDriver:Version_1_21,SplunklogsDriver:Version_1_22,LogentriesDriver:Version_1_25,SumoLogicDriver:Version_1_29,NoneDriver:Version_1_19,}
Functions¶
funcSetMinDockerAPIVersion¶
func SetMinDockerAPIVersion(vDockerVersion)
SetMinDockerAPIVersion sets the minimum/default docker API version that theECS agent will use.
Types¶
typeDockerAPIVersion¶
type DockerAPIVersionstring
func (DockerAPIVersion)Matches¶
func (lhsDockerAPIVersion) Matches(selectorstring) (bool,error)
Matches returns whether or not a version matches a given selector.The selector can be any of the following:
* x.y -- Matches a version exactly the same as the selector version* >=x.y -- Matches a version greater than or equal to the selector version* >x.y -- Matches a version greater than the selector version* <=x.y -- Matches a version less than or equal to the selector version* <x.y -- Matches a version less than the selector version* x.y,a.b -- Matches if the version matches either of the two selector versions
typeDockerVersion¶
type DockerVersionstring
const (Version_1_17DockerVersion = "1.17"Version_1_18DockerVersion = "1.18"Version_1_19DockerVersion = "1.19"Version_1_20DockerVersion = "1.20"Version_1_21DockerVersion = "1.21"Version_1_22DockerVersion = "1.22"Version_1_23DockerVersion = "1.23"Version_1_24DockerVersion = "1.24"Version_1_25DockerVersion = "1.25"Version_1_26DockerVersion = "1.26"Version_1_27DockerVersion = "1.27"Version_1_28DockerVersion = "1.28"Version_1_29DockerVersion = "1.29"Version_1_30DockerVersion = "1.30"Version_1_31DockerVersion = "1.31"Version_1_32DockerVersion = "1.32"Version_1_33DockerVersion = "1.33"Version_1_34DockerVersion = "1.34"Version_1_35DockerVersion = "1.35"Version_1_36DockerVersion = "1.36"Version_1_37DockerVersion = "1.37"Version_1_38DockerVersion = "1.38"Version_1_39DockerVersion = "1.39"Version_1_40DockerVersion = "1.40"Version_1_41DockerVersion = "1.41"Version_1_42DockerVersion = "1.42"Version_1_43DockerVersion = "1.43"Version_1_44DockerVersion = "1.44")
funcGetKnownAPIVersions¶
func GetKnownAPIVersions() []DockerVersion
GetKnownAPIVersions returns all of the API versions that we know about.It doesn't care if the version is supported by Docker or ECS agent
funcGetSupportedDockerAPIVersion¶
func GetSupportedDockerAPIVersion(versionDockerVersion)DockerVersion
GetSupportedDockerAPIVersion takes in a DockerVersion and:1. if the input version is supported, then the same version is returned.2. if the input version is less than the minimum supported version, then the minimum supported version is returned.3. if the input version is invalid, log a warning and return the minimum supported version.
funcSupportedVersionsExtended¶
func SupportedVersionsExtended(supportedVersionsFn func() []DockerVersion) []DockerVersion
SupportedVersionsExtended takes in a function that returns supported docker API versions.It returns a list of "extended" API versions that may not be directly supportedbut their functionality is supported.For example, in Docker Engine 25.x API versions 1.17-1.23 were deprecated to be useddirectly, although their functionality is still supported.
func (DockerVersion)Compare¶
func (dDockerVersion) Compare(rhsDockerVersion)int
Compare returns 0 if versions are equalreturns 1 if this version is greater than rhsreturns -1 if this version if less than rhs
func (DockerVersion)String¶
func (dDockerVersion) String()string
typeLoggingDriver¶
type LoggingDriverstring
const (JSONFileDriverLoggingDriver = "json-file"SyslogDriverLoggingDriver = "syslog"JournaldDriverLoggingDriver = "journald"GelfDriverLoggingDriver = "gelf"FluentdDriverLoggingDriver = "fluentd"AWSLogsDriverLoggingDriver = "awslogs"SplunklogsDriverLoggingDriver = "splunk"LogentriesDriverLoggingDriver = "logentries"SumoLogicDriverLoggingDriver = "sumologic"NoneDriverLoggingDriver = "none"AWSFirelensDriverLoggingDriver = "awsfirelens")
Source Files¶
Directories¶
| Path | Synopsis |
|---|---|
mocks Package mock_dockerapi is a generated GoMock package. | Package mock_dockerapi is a generated GoMock package. |
Package dockerauth handles storing auth configuration information for Docker registries. | Package dockerauth handles storing auth configuration information for Docker registries. |
Package sdkclient contains an interface for moby matching the subset used by the agent | Package sdkclient contains an interface for moby matching the subset used by the agent |
mocks Package mock_sdkclient is a generated GoMock package. | Package mock_sdkclient is a generated GoMock package. |
mocks Package mock_sdkclientfactory is a generated GoMock package. | Package mock_sdkclientfactory is a generated GoMock package. |