sdkclientfactory

package
v1.44.4 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2020 License: Apache-2.0 Imports: 6 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultVersion

func GetDefaultVersion() dockerclient.DockerVersion

getDefaultVersion will return the default Docker API version for linux

Types

type Factory

type Factory interface {
	// GetDefaultClient returns a versioned client for the default version
	GetDefaultClient() (sdkclient.Client, error)

	// GetClient returns a client with the specified version or an error
	// if the client doesn't exist.
	GetClient(version dockerclient.DockerVersion) (sdkclient.Client, error)

	// FindSupportedAPIVersions returns a slice of agent-supported Docker API
	// versions. Versions are tested by making calls against the Docker daemon
	// and may occur either at Factory creation time or lazily upon invocation
	// of this function. The slice represents the intersection of
	// agent-supported versions and daemon-supported versions.
	FindSupportedAPIVersions() []dockerclient.DockerVersion

	// FindKnownAPIVersions returns a slice of Docker API versions that are
	// known to the Docker daemon. Versions are tested by making calls against
	// the Docker daemon and may occur either at Factory creation time or
	// lazily upon invocation of this function. The slice represents the
	// intersection of the API versions that the agent knows exist (but does
	// not necessarily fully support) and the versions that result in
	// successful responses by the Docker daemon.
	FindKnownAPIVersions() []dockerclient.DockerVersion

	// FindClientAPIVersion returns the client api version
	FindClientAPIVersion(sdkclient.Client) dockerclient.DockerVersion
}

Factory provides a collection of docker remote clients that include a recommended client version as well as a set of alternative supported docker clients.

func NewFactory

func NewFactory(ctx context.Context, endpoint string) Factory

NewFactory initializes a client factory using a specified endpoint.

Directories

Path Synopsis
Package mock_sdkclientfactory is a generated GoMock package.
Package mock_sdkclientfactory is a generated GoMock package.

Jump to

Keyboard shortcuts

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