mockdocker

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

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

func NewLogger

func NewLogger(tag string) *Logger

func (*Logger) Error

func (l *Logger) Error(msg interface{})

func (*Logger) Log

func (l *Logger) Log(msg interface{})

func (*Logger) Panic

func (l *Logger) Panic(msg interface{})

func (*Logger) Warn

func (l *Logger) Warn(msg interface{})

type MockDockerService

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

func NewMockDockerService

func NewMockDockerService() *MockDockerService

func NewMockDockerServiceWithInit

func NewMockDockerServiceWithInit(initDocker func() <-chan bool) *MockDockerService

func (*MockDockerService) Destroy

func (m *MockDockerService) Destroy()

Destroy 销毁容器

func (*MockDockerService) InitContainer

func (m *MockDockerService) InitContainer(handler func(opts *docker.CreateContainerOptions)) error

InitContainer 通过容器参数实例化容器

func (*MockDockerService) InitContainerWithCmd

func (m *MockDockerService) InitContainerWithCmd(handler func(cmd *string)) error

InitContainerWithCmd 通过命令行参数初始化容器

func (*MockDockerService) WaitForReady

func (m *MockDockerService) WaitForReady(checkReadyCommand string, timeout time.Duration) bool

WaitForReady 通过命令检测容器是否准备完成

type MockService

type MockService interface {
	InitContainer(handler func(opts *docker.CreateContainerOptions)) error
	Destroy()
}

Jump to

Keyboard shortcuts

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