container

package
v0.0.0-...-b185666 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DockerHeaderSize = 8
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container interface {
	GetStatus() (string, error)
	GetHealth() (string, error)
	GetConnectionString() (string, error)
	Stop() error
}

func GetContainer

func GetContainer(ctx context.Context, containerID string) (Container, error)

type Engine

type Engine interface {
	PullImage() error

	Start(ctx context.Context, image, name string) (Container, error)
	StopAll(ctx context.Context, remove bool) error
}

func NewEngine

func NewEngine() (Engine, error)

type MockContainer

type MockContainer struct {
	mock.Mock
}

MockContainer is an autogenerated mock type for the Container type

func NewMockContainer

func NewMockContainer(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockContainer

NewMockContainer creates a new instance of MockContainer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockContainer) GetConnectionString

func (_m *MockContainer) GetConnectionString() (string, error)

GetConnectionString provides a mock function with given fields:

func (*MockContainer) GetHealth

func (_m *MockContainer) GetHealth() (string, error)

GetHealth provides a mock function with given fields:

func (*MockContainer) GetStatus

func (_m *MockContainer) GetStatus() (string, error)

GetStatus provides a mock function with given fields:

func (*MockContainer) Stop

func (_m *MockContainer) Stop() error

Stop provides a mock function with given fields:

type MockEngine

type MockEngine struct {
	mock.Mock
}

MockEngine is an autogenerated mock type for the Engine type

func NewMockEngine

func NewMockEngine(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockEngine

NewMockEngine creates a new instance of MockEngine. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockEngine) PullImage

func (_m *MockEngine) PullImage() error

PullImage provides a mock function with given fields:

func (*MockEngine) Start

func (_m *MockEngine) Start(ctx context.Context, image string, name string) (Container, error)

Start provides a mock function with given fields: ctx, image, name

func (*MockEngine) StopAll

func (_m *MockEngine) StopAll(ctx context.Context, remove bool) error

StopAll provides a mock function with given fields: ctx, remove

Jump to

Keyboard shortcuts

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