containerd

package
v0.0.0-...-0f641b1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package containerd implements the container.Client interface for the containerd runtime.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(socket, namespace string) (ctr.Client, error)

NewClient creates a new containerd client connected to the given socket.

Types

type MockapiClient

type MockapiClient struct {
	mock.Mock
}

MockapiClient is an autogenerated mock type for the apiClient type

func NewMockapiClient

func NewMockapiClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockapiClient

NewMockapiClient creates a new instance of MockapiClient. 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 (*MockapiClient) Close

func (_m *MockapiClient) Close() error

Close provides a mock function with no fields

func (*MockapiClient) Containers

func (_m *MockapiClient) Containers(ctx context.Context, filters ...string) ([]client.Container, error)

Containers provides a mock function with given fields: ctx, filters

func (*MockapiClient) EXPECT

func (_m *MockapiClient) EXPECT() *MockapiClient_Expecter

func (*MockapiClient) GetImage

func (_m *MockapiClient) GetImage(ctx context.Context, ref string) (client.Image, error)

GetImage provides a mock function with given fields: ctx, ref

func (*MockapiClient) LoadContainer

func (_m *MockapiClient) LoadContainer(ctx context.Context, id string) (client.Container, error)

LoadContainer provides a mock function with given fields: ctx, id

func (*MockapiClient) NewContainer

func (_m *MockapiClient) NewContainer(ctx context.Context, id string, opts ...client.NewContainerOpts) (client.Container, error)

NewContainer provides a mock function with given fields: ctx, id, opts

func (*MockapiClient) Pull

func (_m *MockapiClient) Pull(ctx context.Context, ref string, opts ...client.RemoteOpt) (client.Image, error)

Pull provides a mock function with given fields: ctx, ref, opts

type MockapiClient_Close_Call

type MockapiClient_Close_Call struct {
	*mock.Call
}

MockapiClient_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'

func (*MockapiClient_Close_Call) Return

func (*MockapiClient_Close_Call) Run

func (*MockapiClient_Close_Call) RunAndReturn

func (_c *MockapiClient_Close_Call) RunAndReturn(run func() error) *MockapiClient_Close_Call

type MockapiClient_Containers_Call

type MockapiClient_Containers_Call struct {
	*mock.Call
}

MockapiClient_Containers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Containers'

func (*MockapiClient_Containers_Call) Return

func (*MockapiClient_Containers_Call) Run

func (*MockapiClient_Containers_Call) RunAndReturn

type MockapiClient_Expecter

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

func (*MockapiClient_Expecter) Close

Close is a helper method to define mock.On call

func (*MockapiClient_Expecter) Containers

func (_e *MockapiClient_Expecter) Containers(ctx interface{}, filters ...interface{}) *MockapiClient_Containers_Call

Containers is a helper method to define mock.On call

  • ctx context.Context
  • filters ...string

func (*MockapiClient_Expecter) GetImage

func (_e *MockapiClient_Expecter) GetImage(ctx interface{}, ref interface{}) *MockapiClient_GetImage_Call

GetImage is a helper method to define mock.On call

  • ctx context.Context
  • ref string

func (*MockapiClient_Expecter) LoadContainer

func (_e *MockapiClient_Expecter) LoadContainer(ctx interface{}, id interface{}) *MockapiClient_LoadContainer_Call

LoadContainer is a helper method to define mock.On call

  • ctx context.Context
  • id string

func (*MockapiClient_Expecter) NewContainer

func (_e *MockapiClient_Expecter) NewContainer(ctx interface{}, id interface{}, opts ...interface{}) *MockapiClient_NewContainer_Call

NewContainer is a helper method to define mock.On call

  • ctx context.Context
  • id string
  • opts ...client.NewContainerOpts

func (*MockapiClient_Expecter) Pull

func (_e *MockapiClient_Expecter) Pull(ctx interface{}, ref interface{}, opts ...interface{}) *MockapiClient_Pull_Call

Pull is a helper method to define mock.On call

  • ctx context.Context
  • ref string
  • opts ...client.RemoteOpt

type MockapiClient_GetImage_Call

type MockapiClient_GetImage_Call struct {
	*mock.Call
}

MockapiClient_GetImage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetImage'

func (*MockapiClient_GetImage_Call) Return

func (*MockapiClient_GetImage_Call) Run

func (*MockapiClient_GetImage_Call) RunAndReturn

type MockapiClient_LoadContainer_Call

type MockapiClient_LoadContainer_Call struct {
	*mock.Call
}

MockapiClient_LoadContainer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadContainer'

func (*MockapiClient_LoadContainer_Call) Return

func (*MockapiClient_LoadContainer_Call) Run

func (*MockapiClient_LoadContainer_Call) RunAndReturn

type MockapiClient_NewContainer_Call

type MockapiClient_NewContainer_Call struct {
	*mock.Call
}

MockapiClient_NewContainer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewContainer'

func (*MockapiClient_NewContainer_Call) Return

func (*MockapiClient_NewContainer_Call) Run

func (*MockapiClient_NewContainer_Call) RunAndReturn

type MockapiClient_Pull_Call

type MockapiClient_Pull_Call struct {
	*mock.Call
}

MockapiClient_Pull_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Pull'

func (*MockapiClient_Pull_Call) Return

func (*MockapiClient_Pull_Call) Run

func (*MockapiClient_Pull_Call) RunAndReturn

Jump to

Keyboard shortcuts

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