Documentation
¶
Overview ¶
Package docker is a generated GoMock package.
Package docker is a generated GoMock package.
Index ¶
- Constants
- Variables
- func FilePatternMatchForGPU(pattern string) ([]string, error)
- type Client
- type MockBackoff
- type MockBackoffMockRecorder
- type MockdockerClientFactory
- type MockdockerClientFactoryMockRecorder
- type Mockdockerclient
- func (m *Mockdockerclient) CreateContainer(opts go_dockerclient.CreateContainerOptions) (*go_dockerclient.Container, error)
- func (m *Mockdockerclient) EXPECT() *MockdockerclientMockRecorder
- func (m *Mockdockerclient) ListContainers(opts go_dockerclient.ListContainersOptions) ([]go_dockerclient.APIContainers, error)
- func (m *Mockdockerclient) ListImages(opts go_dockerclient.ListImagesOptions) ([]go_dockerclient.APIImages, error)
- func (m *Mockdockerclient) LoadImage(opts go_dockerclient.LoadImageOptions) error
- func (m *Mockdockerclient) Ping() error
- func (m *Mockdockerclient) RemoveContainer(opts go_dockerclient.RemoveContainerOptions) error
- func (m *Mockdockerclient) StartContainer(id string, hostConfig *go_dockerclient.HostConfig) error
- func (m *Mockdockerclient) StopContainer(id string, timeout uint) error
- func (m *Mockdockerclient) WaitContainer(id string) (int, error)
- type MockdockerclientMockRecorder
- func (mr *MockdockerclientMockRecorder) CreateContainer(opts interface{}) *gomock.Call
- func (mr *MockdockerclientMockRecorder) ListContainers(opts interface{}) *gomock.Call
- func (mr *MockdockerclientMockRecorder) ListImages(opts interface{}) *gomock.Call
- func (mr *MockdockerclientMockRecorder) LoadImage(opts interface{}) *gomock.Call
- func (mr *MockdockerclientMockRecorder) Ping() *gomock.Call
- func (mr *MockdockerclientMockRecorder) RemoveContainer(opts interface{}) *gomock.Call
- func (mr *MockdockerclientMockRecorder) StartContainer(id, hostConfig interface{}) *gomock.Call
- func (mr *MockdockerclientMockRecorder) StopContainer(id, timeout interface{}) *gomock.Call
- func (mr *MockdockerclientMockRecorder) WaitContainer(id interface{}) *gomock.Call
- type MockfileSystem
- type MockfileSystemMockRecorder
Constants ¶
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 ¶
var MatchFilePatternForGPU = FilePatternMatchForGPU
Functions ¶
func FilePatternMatchForGPU ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client enables business logic for running the Agent inside Docker
func (*Client) IsAgentImageLoaded ¶
IsAgentImageLoaded returns true if the Agent image is loaded in Docker
func (*Client) LoadEnvVars ¶
func (*Client) RemoveExistingAgentContainer ¶
RemoveExistingAgentContainer remvoes any existing container named "ecs-agent" or returns without error if none is found
func (*Client) StartAgent ¶
StartAgent starts the Agent in Docker and returns the exit code from the container
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 ¶
func (m *MockdockerClientFactory) EXPECT() *MockdockerClientFactoryMockRecorder
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 ¶
func (m *Mockdockerclient) CreateContainer(opts go_dockerclient.CreateContainerOptions) (*go_dockerclient.Container, error)
CreateContainer mocks base method
func (*Mockdockerclient) EXPECT ¶
func (m *Mockdockerclient) EXPECT() *MockdockerclientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*Mockdockerclient) ListContainers ¶
func (m *Mockdockerclient) ListContainers(opts go_dockerclient.ListContainersOptions) ([]go_dockerclient.APIContainers, error)
ListContainers mocks base method
func (*Mockdockerclient) ListImages ¶
func (m *Mockdockerclient) ListImages(opts go_dockerclient.ListImagesOptions) ([]go_dockerclient.APIImages, error)
ListImages mocks base method
func (*Mockdockerclient) LoadImage ¶
func (m *Mockdockerclient) LoadImage(opts go_dockerclient.LoadImageOptions) error
LoadImage mocks base method
func (*Mockdockerclient) RemoveContainer ¶
func (m *Mockdockerclient) RemoveContainer(opts go_dockerclient.RemoveContainerOptions) error
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 ¶
func (mr *MockdockerclientMockRecorder) Ping() *gomock.Call
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 ¶
func (m *MockfileSystem) EXPECT() *MockfileSystemMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
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