Documentation
¶
Overview ¶
Package runtime is a generated GoMock package.
Index ¶
- type ContainerConfig
- type DockerRuntime
- func (d *DockerRuntime) EmitUnhealthyError(sink output.Sink, err error)
- func (d *DockerRuntime) GetImageVersion(ctx context.Context, imageName string) (string, error)
- func (d *DockerRuntime) IsHealthy(ctx context.Context) error
- func (d *DockerRuntime) IsRunning(ctx context.Context, containerID string) (bool, error)
- func (d *DockerRuntime) Logs(ctx context.Context, containerID string, tail int) (string, error)
- func (d *DockerRuntime) PullImage(ctx context.Context, imageName string, progress chan<- PullProgress) error
- func (d *DockerRuntime) Remove(ctx context.Context, containerName string) error
- func (d *DockerRuntime) Start(ctx context.Context, config ContainerConfig) (string, error)
- func (d *DockerRuntime) Stop(ctx context.Context, containerName string) error
- func (d *DockerRuntime) StreamLogs(ctx context.Context, containerID string, out io.Writer, follow bool) error
- type MockRuntime
- func (m *MockRuntime) EXPECT() *MockRuntimeMockRecorder
- func (m *MockRuntime) EmitUnhealthyError(sink output.Sink, err error)
- func (m *MockRuntime) GetImageVersion(ctx context.Context, imageName string) (string, error)
- func (m *MockRuntime) IsHealthy(ctx context.Context) error
- func (m *MockRuntime) IsRunning(ctx context.Context, containerID string) (bool, error)
- func (m *MockRuntime) Logs(ctx context.Context, containerID string, tail int) (string, error)
- func (m *MockRuntime) PullImage(ctx context.Context, image string, progress chan<- PullProgress) error
- func (m *MockRuntime) Remove(ctx context.Context, containerName string) error
- func (m *MockRuntime) Start(ctx context.Context, config ContainerConfig) (string, error)
- func (m *MockRuntime) Stop(ctx context.Context, containerName string) error
- func (m *MockRuntime) StreamLogs(ctx context.Context, containerID string, out io.Writer, follow bool) error
- type MockRuntimeMockRecorder
- func (mr *MockRuntimeMockRecorder) EmitUnhealthyError(sink, err any) *gomock.Call
- func (mr *MockRuntimeMockRecorder) GetImageVersion(ctx, imageName any) *gomock.Call
- func (mr *MockRuntimeMockRecorder) IsHealthy(ctx any) *gomock.Call
- func (mr *MockRuntimeMockRecorder) IsRunning(ctx, containerID any) *gomock.Call
- func (mr *MockRuntimeMockRecorder) Logs(ctx, containerID, tail any) *gomock.Call
- func (mr *MockRuntimeMockRecorder) PullImage(ctx, image, progress any) *gomock.Call
- func (mr *MockRuntimeMockRecorder) Remove(ctx, containerName any) *gomock.Call
- func (mr *MockRuntimeMockRecorder) Start(ctx, config any) *gomock.Call
- func (mr *MockRuntimeMockRecorder) Stop(ctx, containerName any) *gomock.Call
- func (mr *MockRuntimeMockRecorder) StreamLogs(ctx, containerID, out, follow any) *gomock.Call
- type PullProgress
- type Runtime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerConfig ¶
type DockerRuntime ¶
type DockerRuntime struct {
// contains filtered or unexported fields
}
DockerRuntime implements Runtime using the Docker API.
func NewDockerRuntime ¶
func NewDockerRuntime() (*DockerRuntime, error)
func (*DockerRuntime) EmitUnhealthyError ¶ added in v0.2.0
func (d *DockerRuntime) EmitUnhealthyError(sink output.Sink, err error)
func (*DockerRuntime) GetImageVersion ¶
func (*DockerRuntime) IsHealthy ¶ added in v0.2.0
func (d *DockerRuntime) IsHealthy(ctx context.Context) error
func (*DockerRuntime) PullImage ¶
func (d *DockerRuntime) PullImage(ctx context.Context, imageName string, progress chan<- PullProgress) error
func (*DockerRuntime) Remove ¶
func (d *DockerRuntime) Remove(ctx context.Context, containerName string) error
func (*DockerRuntime) Start ¶
func (d *DockerRuntime) Start(ctx context.Context, config ContainerConfig) (string, error)
func (*DockerRuntime) Stop ¶
func (d *DockerRuntime) Stop(ctx context.Context, containerName string) error
func (*DockerRuntime) StreamLogs ¶
type MockRuntime ¶ added in v0.2.0
type MockRuntime struct {
// contains filtered or unexported fields
}
MockRuntime is a mock of Runtime interface.
func NewMockRuntime ¶ added in v0.2.0
func NewMockRuntime(ctrl *gomock.Controller) *MockRuntime
NewMockRuntime creates a new mock instance.
func (*MockRuntime) EXPECT ¶ added in v0.2.0
func (m *MockRuntime) EXPECT() *MockRuntimeMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRuntime) EmitUnhealthyError ¶ added in v0.2.0
func (m *MockRuntime) EmitUnhealthyError(sink output.Sink, err error)
EmitUnhealthyError mocks base method.
func (*MockRuntime) GetImageVersion ¶ added in v0.2.0
GetImageVersion mocks base method.
func (*MockRuntime) IsHealthy ¶ added in v0.2.0
func (m *MockRuntime) IsHealthy(ctx context.Context) error
IsHealthy mocks base method.
func (*MockRuntime) PullImage ¶ added in v0.2.0
func (m *MockRuntime) PullImage(ctx context.Context, image string, progress chan<- PullProgress) error
PullImage mocks base method.
func (*MockRuntime) Remove ¶ added in v0.2.0
func (m *MockRuntime) Remove(ctx context.Context, containerName string) error
Remove mocks base method.
func (*MockRuntime) Start ¶ added in v0.2.0
func (m *MockRuntime) Start(ctx context.Context, config ContainerConfig) (string, error)
Start mocks base method.
func (*MockRuntime) Stop ¶ added in v0.2.0
func (m *MockRuntime) Stop(ctx context.Context, containerName string) error
Stop mocks base method.
func (*MockRuntime) StreamLogs ¶ added in v0.2.0
func (m *MockRuntime) StreamLogs(ctx context.Context, containerID string, out io.Writer, follow bool) error
StreamLogs mocks base method.
type MockRuntimeMockRecorder ¶ added in v0.2.0
type MockRuntimeMockRecorder struct {
// contains filtered or unexported fields
}
MockRuntimeMockRecorder is the mock recorder for MockRuntime.
func (*MockRuntimeMockRecorder) EmitUnhealthyError ¶ added in v0.2.0
func (mr *MockRuntimeMockRecorder) EmitUnhealthyError(sink, err any) *gomock.Call
EmitUnhealthyError indicates an expected call of EmitUnhealthyError.
func (*MockRuntimeMockRecorder) GetImageVersion ¶ added in v0.2.0
func (mr *MockRuntimeMockRecorder) GetImageVersion(ctx, imageName any) *gomock.Call
GetImageVersion indicates an expected call of GetImageVersion.
func (*MockRuntimeMockRecorder) IsHealthy ¶ added in v0.2.0
func (mr *MockRuntimeMockRecorder) IsHealthy(ctx any) *gomock.Call
IsHealthy indicates an expected call of IsHealthy.
func (*MockRuntimeMockRecorder) IsRunning ¶ added in v0.2.0
func (mr *MockRuntimeMockRecorder) IsRunning(ctx, containerID any) *gomock.Call
IsRunning indicates an expected call of IsRunning.
func (*MockRuntimeMockRecorder) Logs ¶ added in v0.2.0
func (mr *MockRuntimeMockRecorder) Logs(ctx, containerID, tail any) *gomock.Call
Logs indicates an expected call of Logs.
func (*MockRuntimeMockRecorder) PullImage ¶ added in v0.2.0
func (mr *MockRuntimeMockRecorder) PullImage(ctx, image, progress any) *gomock.Call
PullImage indicates an expected call of PullImage.
func (*MockRuntimeMockRecorder) Remove ¶ added in v0.2.0
func (mr *MockRuntimeMockRecorder) Remove(ctx, containerName any) *gomock.Call
Remove indicates an expected call of Remove.
func (*MockRuntimeMockRecorder) Start ¶ added in v0.2.0
func (mr *MockRuntimeMockRecorder) Start(ctx, config any) *gomock.Call
Start indicates an expected call of Start.
func (*MockRuntimeMockRecorder) Stop ¶ added in v0.2.0
func (mr *MockRuntimeMockRecorder) Stop(ctx, containerName any) *gomock.Call
Stop indicates an expected call of Stop.
func (*MockRuntimeMockRecorder) StreamLogs ¶ added in v0.2.0
func (mr *MockRuntimeMockRecorder) StreamLogs(ctx, containerID, out, follow any) *gomock.Call
StreamLogs indicates an expected call of StreamLogs.
type PullProgress ¶
type Runtime ¶
type Runtime interface {
IsHealthy(ctx context.Context) error
EmitUnhealthyError(sink output.Sink, err error)
PullImage(ctx context.Context, image string, progress chan<- PullProgress) error
Start(ctx context.Context, config ContainerConfig) (string, error)
Stop(ctx context.Context, containerName string) error
Remove(ctx context.Context, containerName string) error
IsRunning(ctx context.Context, containerID string) (bool, error)
Logs(ctx context.Context, containerID string, tail int) (string, error)
StreamLogs(ctx context.Context, containerID string, out io.Writer, follow bool) error
GetImageVersion(ctx context.Context, imageName string) (string, error)
}
Runtime abstracts container runtime operations (Docker, Podman, Kubernetes, etc.)