docker

package
v1.25.3 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2019 License: Apache-2.0 Imports: 15 Imported by: 5

Documentation

Overview

Package docker is a generated GoMock package.

Package docker is a generated GoMock package.

Index

Constants

View Source
const (

	// CapNetAdmin to start agent with NET_ADMIN capability
	// For more information on capabilities, please read this manpage:
	// http://man7.org/linux/man-pages/man7/capabilities.7.html
	CapNetAdmin = "NET_ADMIN"
	// CapSysAdmin to start agent with SYS_ADMIN capability
	// This is needed for the ECS Agent to invoke the setns call when
	// configuring the network namespace of the pause container
	// For more information on setns, please read this manpage:
	// http://man7.org/linux/man-pages/man2/setns.2.html
	CapSysAdmin = "SYS_ADMIN"
	// DefaultCgroupMountpoint is the default mount point for the cgroup subsystem
	DefaultCgroupMountpoint = "/sys/fs/cgroup"
)

Variables

View Source
var MatchFilePatternForGPU = FilePatternMatchForGPU

Functions

func FilePatternMatchForGPU

func FilePatternMatchForGPU(pattern string) ([]string, error)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client enables business logic for running the Agent inside Docker

func NewClient

func NewClient() (*Client, error)

NewClient reutrns a new Client

func (*Client) IsAgentImageLoaded

func (c *Client) IsAgentImageLoaded() (bool, error)

IsAgentImageLoaded returns true if the Agent image is loaded in Docker

func (*Client) LoadEnvVars

func (c *Client) LoadEnvVars() map[string]string

func (*Client) LoadImage

func (c *Client) LoadImage(image io.Reader) error

LoadImage loads an io.Reader into Docker

func (*Client) RemoveExistingAgentContainer

func (c *Client) RemoveExistingAgentContainer() error

RemoveExistingAgentContainer remvoes any existing container named "ecs-agent" or returns without error if none is found

func (*Client) StartAgent

func (c *Client) StartAgent() (int, error)

StartAgent starts the Agent in Docker and returns the exit code from the container

func (*Client) StopAgent

func (c *Client) StopAgent() error

StopAgent stops the Agent in docker if one is running

type MockBackoff

type MockBackoff struct {
	// contains filtered or unexported fields
}

MockBackoff is a mock of Backoff interface

func NewMockBackoff

func NewMockBackoff(ctrl *gomock.Controller) *MockBackoff

NewMockBackoff creates a new mock instance

func (*MockBackoff) Duration

func (m *MockBackoff) Duration() time.Duration

Duration mocks base method

func (*MockBackoff) EXPECT

func (m *MockBackoff) EXPECT() *MockBackoffMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockBackoff) ShouldRetry

func (m *MockBackoff) ShouldRetry() bool

ShouldRetry mocks base method

type MockBackoffMockRecorder

type MockBackoffMockRecorder struct {
	// contains filtered or unexported fields
}

MockBackoffMockRecorder is the mock recorder for MockBackoff

func (*MockBackoffMockRecorder) Duration

func (mr *MockBackoffMockRecorder) Duration() *gomock.Call

Duration indicates an expected call of Duration

func (*MockBackoffMockRecorder) ShouldRetry

func (mr *MockBackoffMockRecorder) ShouldRetry() *gomock.Call

ShouldRetry indicates an expected call of ShouldRetry

type MockdockerClientFactory

type MockdockerClientFactory struct {
	// contains filtered or unexported fields
}

MockdockerClientFactory is a mock of dockerClientFactory interface

func NewMockdockerClientFactory

func NewMockdockerClientFactory(ctrl *gomock.Controller) *MockdockerClientFactory

NewMockdockerClientFactory creates a new mock instance

func (*MockdockerClientFactory) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockdockerClientFactory) NewVersionedClient

func (m *MockdockerClientFactory) NewVersionedClient(endpoint, apiVersionString string) (dockerclient, error)

NewVersionedClient mocks base method

type MockdockerClientFactoryMockRecorder

type MockdockerClientFactoryMockRecorder struct {
	// contains filtered or unexported fields
}

MockdockerClientFactoryMockRecorder is the mock recorder for MockdockerClientFactory

func (*MockdockerClientFactoryMockRecorder) NewVersionedClient

func (mr *MockdockerClientFactoryMockRecorder) NewVersionedClient(endpoint, apiVersionString interface{}) *gomock.Call

NewVersionedClient indicates an expected call of NewVersionedClient

type Mockdockerclient

type Mockdockerclient struct {
	// contains filtered or unexported fields
}

Mockdockerclient is a mock of dockerclient interface

func NewMockdockerclient

func NewMockdockerclient(ctrl *gomock.Controller) *Mockdockerclient

NewMockdockerclient creates a new mock instance

func (*Mockdockerclient) CreateContainer

CreateContainer mocks base method

func (*Mockdockerclient) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*Mockdockerclient) ListContainers

ListContainers mocks base method

func (*Mockdockerclient) ListImages

ListImages mocks base method

func (*Mockdockerclient) LoadImage

LoadImage mocks base method

func (*Mockdockerclient) Ping

func (m *Mockdockerclient) Ping() error

Ping mocks base method

func (*Mockdockerclient) RemoveContainer

RemoveContainer mocks base method

func (*Mockdockerclient) StartContainer

func (m *Mockdockerclient) StartContainer(id string, hostConfig *go_dockerclient.HostConfig) error

StartContainer mocks base method

func (*Mockdockerclient) StopContainer

func (m *Mockdockerclient) StopContainer(id string, timeout uint) error

StopContainer mocks base method

func (*Mockdockerclient) WaitContainer

func (m *Mockdockerclient) WaitContainer(id string) (int, error)

WaitContainer mocks base method

type MockdockerclientMockRecorder

type MockdockerclientMockRecorder struct {
	// contains filtered or unexported fields
}

MockdockerclientMockRecorder is the mock recorder for Mockdockerclient

func (*MockdockerclientMockRecorder) CreateContainer

func (mr *MockdockerclientMockRecorder) CreateContainer(opts interface{}) *gomock.Call

CreateContainer indicates an expected call of CreateContainer

func (*MockdockerclientMockRecorder) ListContainers

func (mr *MockdockerclientMockRecorder) ListContainers(opts interface{}) *gomock.Call

ListContainers indicates an expected call of ListContainers

func (*MockdockerclientMockRecorder) ListImages

func (mr *MockdockerclientMockRecorder) ListImages(opts interface{}) *gomock.Call

ListImages indicates an expected call of ListImages

func (*MockdockerclientMockRecorder) LoadImage

func (mr *MockdockerclientMockRecorder) LoadImage(opts interface{}) *gomock.Call

LoadImage indicates an expected call of LoadImage

func (*MockdockerclientMockRecorder) Ping

Ping indicates an expected call of Ping

func (*MockdockerclientMockRecorder) RemoveContainer

func (mr *MockdockerclientMockRecorder) RemoveContainer(opts interface{}) *gomock.Call

RemoveContainer indicates an expected call of RemoveContainer

func (*MockdockerclientMockRecorder) StartContainer

func (mr *MockdockerclientMockRecorder) StartContainer(id, hostConfig interface{}) *gomock.Call

StartContainer indicates an expected call of StartContainer

func (*MockdockerclientMockRecorder) StopContainer

func (mr *MockdockerclientMockRecorder) StopContainer(id, timeout interface{}) *gomock.Call

StopContainer indicates an expected call of StopContainer

func (*MockdockerclientMockRecorder) WaitContainer

func (mr *MockdockerclientMockRecorder) WaitContainer(id interface{}) *gomock.Call

WaitContainer indicates an expected call of WaitContainer

type MockfileSystem

type MockfileSystem struct {
	// contains filtered or unexported fields
}

MockfileSystem is a mock of fileSystem interface

func NewMockfileSystem

func NewMockfileSystem(ctrl *gomock.Controller) *MockfileSystem

NewMockfileSystem creates a new mock instance

func (*MockfileSystem) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockfileSystem) ReadFile

func (m *MockfileSystem) ReadFile(filename string) ([]byte, error)

ReadFile mocks base method

type MockfileSystemMockRecorder

type MockfileSystemMockRecorder struct {
	// contains filtered or unexported fields
}

MockfileSystemMockRecorder is the mock recorder for MockfileSystem

func (*MockfileSystemMockRecorder) ReadFile

func (mr *MockfileSystemMockRecorder) ReadFile(filename interface{}) *gomock.Call

ReadFile indicates an expected call of ReadFile

Jump to

Keyboard shortcuts

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