Documentation ¶
Index ¶
- Variables
- func NewFakeCNIPlugin() ocicni.CNIPlugin
- type CNIPluginArgument
- type CalledDetail
- type EventClient
- type FakeCNIPlugin
- func (f *FakeCNIPlugin) ClearErrors()
- func (f *FakeCNIPlugin) GetCalledDetails() []CalledDetail
- func (f *FakeCNIPlugin) GetCalledNames() []string
- func (f *FakeCNIPlugin) GetContainerNetworkStatus(netnsPath string, namespace string, name string, containerID string) (string, error)
- func (f *FakeCNIPlugin) InjectError(fn string, err error)
- func (f *FakeCNIPlugin) InjectErrors(errs map[string]error)
- func (f *FakeCNIPlugin) Name() string
- func (f *FakeCNIPlugin) SetFakePodNetwork(netnsPath string, namespace string, name string, containerID string, ip string)
- func (f *FakeCNIPlugin) SetUpPod(netnsPath string, namespace string, name string, containerID string) error
- func (f *FakeCNIPlugin) Status() error
- func (f *FakeCNIPlugin) TearDownPod(netnsPath string, namespace string, name string, containerID string) error
- type FakeContainersClient
- func (f *FakeContainersClient) ClearCalls()
- func (f *FakeContainersClient) ClearErrors()
- func (f *FakeContainersClient) Create(ctx context.Context, createOpts *containers.CreateContainerRequest, ...) (*containers.CreateContainerResponse, error)
- func (f *FakeContainersClient) Delete(ctx context.Context, deleteOpts *containers.DeleteContainerRequest, ...) (*googleprotobuf.Empty, error)
- func (f *FakeContainersClient) Get(ctx context.Context, getOpts *containers.GetContainerRequest, ...) (*containers.GetContainerResponse, error)
- func (f *FakeContainersClient) GetCalledDetails() []CalledDetail
- func (f *FakeContainersClient) GetCalledNames() []string
- func (f *FakeContainersClient) InjectError(fn string, err error)
- func (f *FakeContainersClient) InjectErrors(errs map[string]error)
- func (f *FakeContainersClient) List(ctx context.Context, listOpts *containers.ListContainersRequest, ...) (*containers.ListContainersResponse, error)
- func (f *FakeContainersClient) Update(ctx context.Context, updateOpts *containers.UpdateContainerRequest, ...) (*containers.UpdateContainerResponse, error)
- type FakeExecutionClient
- func (f *FakeExecutionClient) Checkpoint(ctx context.Context, in *execution.CheckpointRequest, opts ...grpc.CallOption) (*execution.CheckpointResponse, error)
- func (f *FakeExecutionClient) ClearCalls()
- func (f *FakeExecutionClient) ClearErrors()
- func (f *FakeExecutionClient) CloseStdin(ctx context.Context, closeStdinOpts *execution.CloseStdinRequest, ...) (*googleprotobuf.Empty, error)
- func (f *FakeExecutionClient) Create(ctx context.Context, createOpts *execution.CreateRequest, ...) (*execution.CreateResponse, error)
- func (f *FakeExecutionClient) Delete(ctx context.Context, deleteOpts *execution.DeleteRequest, ...) (*execution.DeleteResponse, error)
- func (f *FakeExecutionClient) DeleteProcess(ctx context.Context, in *execution.DeleteProcessRequest, ...) (*execution.DeleteResponse, error)
- func (f *FakeExecutionClient) Events(ctx context.Context, eventsOpts *execution.EventsRequest, ...) (execution.Tasks_EventsClient, error)
- func (f *FakeExecutionClient) Exec(ctx context.Context, execOpts *execution.ExecRequest, opts ...grpc.CallOption) (*execution.ExecResponse, error)
- func (f *FakeExecutionClient) GetCalledDetails() []CalledDetail
- func (f *FakeExecutionClient) GetCalledNames() []string
- func (f *FakeExecutionClient) Info(ctx context.Context, infoOpts *execution.InfoRequest, opts ...grpc.CallOption) (*execution.InfoResponse, error)
- func (f *FakeExecutionClient) InjectError(fn string, err error)
- func (f *FakeExecutionClient) InjectErrors(errs map[string]error)
- func (f *FakeExecutionClient) Kill(ctx context.Context, killOpts *execution.KillRequest, opts ...grpc.CallOption) (*googleprotobuf.Empty, error)
- func (f *FakeExecutionClient) List(ctx context.Context, listOpts *execution.ListRequest, opts ...grpc.CallOption) (*execution.ListResponse, error)
- func (f *FakeExecutionClient) Pause(ctx context.Context, in *execution.PauseRequest, opts ...grpc.CallOption) (*googleprotobuf.Empty, error)
- func (f *FakeExecutionClient) Processes(ctx context.Context, in *execution.ProcessesRequest, opts ...grpc.CallOption) (*execution.ProcessesResponse, error)
- func (f *FakeExecutionClient) Pty(ctx context.Context, ptyOpts *execution.PtyRequest, opts ...grpc.CallOption) (*googleprotobuf.Empty, error)
- func (f *FakeExecutionClient) Resume(ctx context.Context, in *execution.ResumeRequest, opts ...grpc.CallOption) (*googleprotobuf.Empty, error)
- func (f *FakeExecutionClient) SetFakeTasks(tasks []task.Task)
- func (f *FakeExecutionClient) Start(ctx context.Context, startOpts *execution.StartRequest, ...) (*googleprotobuf.Empty, error)
- func (f *FakeExecutionClient) Stop()
- func (f *FakeExecutionClient) WithEvents() *FakeExecutionClient
- type FakeImagesClient
- func (f *FakeImagesClient) ClearErrors()
- func (f *FakeImagesClient) Delete(ctx context.Context, deleteOpts *images.DeleteRequest, opts ...grpc.CallOption) (*googleprotobuf.Empty, error)
- func (f *FakeImagesClient) Get(ctx context.Context, getOpts *images.GetRequest, opts ...grpc.CallOption) (*images.GetResponse, error)
- func (f *FakeImagesClient) GetCalledNames() []string
- func (f *FakeImagesClient) InjectError(fn string, err error)
- func (f *FakeImagesClient) InjectErrors(errs map[string]error)
- func (f *FakeImagesClient) List(ctx context.Context, listOpts *images.ListRequest, opts ...grpc.CallOption) (*images.ListResponse, error)
- func (f *FakeImagesClient) Put(ctx context.Context, putOpts *images.PutRequest, opts ...grpc.CallOption) (*googleprotobuf.Empty, error)
- func (f *FakeImagesClient) SetFakeImages(images []images.Image)
- type FakeSnapshotClient
- func (f *FakeSnapshotClient) ClearErrors()
- func (f *FakeSnapshotClient) Commit(ctx context.Context, in *snapshot.CommitRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
- func (f *FakeSnapshotClient) GetCalledDetails() []CalledDetail
- func (f *FakeSnapshotClient) GetCalledNames() []string
- func (f *FakeSnapshotClient) InjectError(fn string, err error)
- func (f *FakeSnapshotClient) InjectErrors(errs map[string]error)
- func (f *FakeSnapshotClient) List(ctx context.Context, in *snapshot.ListRequest, opts ...grpc.CallOption) (snapshot.Snapshot_ListClient, error)
- func (f *FakeSnapshotClient) ListMounts() [][]*mount.Mount
- func (f *FakeSnapshotClient) Mounts(ctx context.Context, mountsOpts *snapshot.MountsRequest, ...) (*snapshot.MountsResponse, error)
- func (f *FakeSnapshotClient) Prepare(ctx context.Context, prepareOpts *snapshot.PrepareRequest, ...) (*snapshot.MountsResponse, error)
- func (f *FakeSnapshotClient) Remove(ctx context.Context, removeOpts *snapshot.RemoveRequest, ...) (*google_protobuf1.Empty, error)
- func (f *FakeSnapshotClient) SetFakeMounts(name string, mounts []*mount.Mount)
- func (f *FakeSnapshotClient) Stat(ctx context.Context, in *snapshot.StatRequest, opts ...grpc.CallOption) (*snapshot.StatResponse, error)
- func (f *FakeSnapshotClient) Usage(ctx context.Context, in *snapshot.UsageRequest, opts ...grpc.CallOption) (*snapshot.UsageResponse, error)
- func (f *FakeSnapshotClient) View(ctx context.Context, viewOpts *snapshot.PrepareRequest, ...) (*snapshot.MountsResponse, error)
- type MockHealthClient
- type MockVersionClient
Constants ¶
This section is empty.
Variables ¶
var ContainerNotExistError = grpc.Errorf(codes.NotFound, "container does not exist")
ContainerNotExistError is the fake error returned when container does not exist.
var SnapshotNotExistError = grpc.Errorf(codes.NotFound, "snapshot does not exist")
SnapshotNotExistError is the fake error returned when snapshot does not exist.
var TaskNotExistError = grpc.Errorf(codes.NotFound, "task does not exist")
TaskNotExistError is the fake error returned when task does not exist.
Functions ¶
func NewFakeCNIPlugin ¶
NewFakeCNIPlugin create a FakeCNIPlugin.
Types ¶
type CNIPluginArgument ¶
CNIPluginArgument is arguments used to call CNI related functions.
type CalledDetail ¶
type CalledDetail struct { // Name of the function called. Name string // Argument of the function called. Argument interface{} }
CalledDetail is the struct contains called function name and arguments.
type EventClient ¶
type EventClient struct { Events chan *task.Event grpc.ClientStream }
EventClient is a test implementation of execution.Tasks_EventsClient
type FakeCNIPlugin ¶
type FakeCNIPlugin struct { sync.Mutex IPMap map[CNIPluginArgument]string // contains filtered or unexported fields }
FakeCNIPlugin is a fake plugin used for test.
func (*FakeCNIPlugin) ClearErrors ¶
func (f *FakeCNIPlugin) ClearErrors()
ClearErrors clear errors for call
func (*FakeCNIPlugin) GetCalledDetails ¶
func (f *FakeCNIPlugin) GetCalledDetails() []CalledDetail
GetCalledDetails get detail of each call.
func (*FakeCNIPlugin) GetCalledNames ¶
func (f *FakeCNIPlugin) GetCalledNames() []string
GetCalledNames get names of call
func (*FakeCNIPlugin) GetContainerNetworkStatus ¶
func (f *FakeCNIPlugin) GetContainerNetworkStatus(netnsPath string, namespace string, name string, containerID string) (string, error)
GetContainerNetworkStatus get the status of network.
func (*FakeCNIPlugin) InjectError ¶
func (f *FakeCNIPlugin) InjectError(fn string, err error)
InjectError inject error for call
func (*FakeCNIPlugin) InjectErrors ¶
func (f *FakeCNIPlugin) InjectErrors(errs map[string]error)
InjectErrors inject errors for calls
func (*FakeCNIPlugin) Name ¶
func (f *FakeCNIPlugin) Name() string
Name return the name of fake CNI plugin.
func (*FakeCNIPlugin) SetFakePodNetwork ¶
func (f *FakeCNIPlugin) SetFakePodNetwork(netnsPath string, namespace string, name string, containerID string, ip string)
SetFakePodNetwork sets the given IP for given arguments.
func (*FakeCNIPlugin) SetUpPod ¶
func (f *FakeCNIPlugin) SetUpPod(netnsPath string, namespace string, name string, containerID string) error
SetUpPod setup the network of PodSandbox.
func (*FakeCNIPlugin) Status ¶
func (f *FakeCNIPlugin) Status() error
Status get the status of the plugin.
func (*FakeCNIPlugin) TearDownPod ¶
func (f *FakeCNIPlugin) TearDownPod(netnsPath string, namespace string, name string, containerID string) error
TearDownPod teardown the network of PodSandbox.
type FakeContainersClient ¶
type FakeContainersClient struct { sync.Mutex ContainerList map[string]containers.Container // contains filtered or unexported fields }
FakeContainersClient is a simple fake containers client, so that cri-containerd can be run for testing without requiring a real containerd setup.
func NewFakeContainersClient ¶
func NewFakeContainersClient() *FakeContainersClient
NewFakeContainersClient creates a FakeContainersClient
func (*FakeContainersClient) ClearCalls ¶
func (f *FakeContainersClient) ClearCalls()
ClearCalls clear all call detail.
func (*FakeContainersClient) ClearErrors ¶
func (f *FakeContainersClient) ClearErrors()
ClearErrors clear errors for call
func (*FakeContainersClient) Create ¶
func (f *FakeContainersClient) Create(ctx context.Context, createOpts *containers.CreateContainerRequest, opts ...grpc.CallOption) (*containers.CreateContainerResponse, error)
Create is a test implementation of containers.Create.
func (*FakeContainersClient) Delete ¶
func (f *FakeContainersClient) Delete(ctx context.Context, deleteOpts *containers.DeleteContainerRequest, opts ...grpc.CallOption) (*googleprotobuf.Empty, error)
Delete is a test implementation of containers.Delete
func (*FakeContainersClient) Get ¶
func (f *FakeContainersClient) Get(ctx context.Context, getOpts *containers.GetContainerRequest, opts ...grpc.CallOption) (*containers.GetContainerResponse, error)
Get is a test implementation of containers.Get
func (*FakeContainersClient) GetCalledDetails ¶
func (f *FakeContainersClient) GetCalledDetails() []CalledDetail
GetCalledDetails get detail of each call.
func (*FakeContainersClient) GetCalledNames ¶
func (f *FakeContainersClient) GetCalledNames() []string
GetCalledNames get names of call
func (*FakeContainersClient) InjectError ¶
func (f *FakeContainersClient) InjectError(fn string, err error)
InjectError inject error for call
func (*FakeContainersClient) InjectErrors ¶
func (f *FakeContainersClient) InjectErrors(errs map[string]error)
InjectErrors inject errors for calls
func (*FakeContainersClient) List ¶
func (f *FakeContainersClient) List(ctx context.Context, listOpts *containers.ListContainersRequest, opts ...grpc.CallOption) (*containers.ListContainersResponse, error)
List is a test implementation of containers.List
func (*FakeContainersClient) Update ¶
func (f *FakeContainersClient) Update(ctx context.Context, updateOpts *containers.UpdateContainerRequest, opts ...grpc.CallOption) (*containers.UpdateContainerResponse, error)
Update is a test implementation of containers.Update
type FakeExecutionClient ¶
type FakeExecutionClient struct { sync.Mutex TaskList map[string]task.Task // contains filtered or unexported fields }
FakeExecutionClient is a simple fake execution client, so that cri-containerd can be run for testing without requiring a real containerd setup.
func NewFakeExecutionClient ¶
func NewFakeExecutionClient() *FakeExecutionClient
NewFakeExecutionClient creates a FakeExecutionClient
func (*FakeExecutionClient) Checkpoint ¶
func (f *FakeExecutionClient) Checkpoint(ctx context.Context, in *execution.CheckpointRequest, opts ...grpc.CallOption) (*execution.CheckpointResponse, error)
Checkpoint is a test implementation of execution.Checkpoint
func (*FakeExecutionClient) ClearCalls ¶
func (f *FakeExecutionClient) ClearCalls()
ClearCalls clear all call detail.
func (*FakeExecutionClient) ClearErrors ¶
func (f *FakeExecutionClient) ClearErrors()
ClearErrors clear errors for call
func (*FakeExecutionClient) CloseStdin ¶
func (f *FakeExecutionClient) CloseStdin(ctx context.Context, closeStdinOpts *execution.CloseStdinRequest, opts ...grpc.CallOption) (*googleprotobuf.Empty, error)
CloseStdin is a test implementation of execution.CloseStdin
func (*FakeExecutionClient) Create ¶
func (f *FakeExecutionClient) Create(ctx context.Context, createOpts *execution.CreateRequest, opts ...grpc.CallOption) (*execution.CreateResponse, error)
Create is a test implementation of execution.Create.
func (*FakeExecutionClient) Delete ¶
func (f *FakeExecutionClient) Delete(ctx context.Context, deleteOpts *execution.DeleteRequest, opts ...grpc.CallOption) (*execution.DeleteResponse, error)
Delete is a test implementation of execution.Delete
func (*FakeExecutionClient) DeleteProcess ¶
func (f *FakeExecutionClient) DeleteProcess(ctx context.Context, in *execution.DeleteProcessRequest, opts ...grpc.CallOption) (*execution.DeleteResponse, error)
DeleteProcess is a test implementation of execution.DeleteProcess
func (*FakeExecutionClient) Events ¶
func (f *FakeExecutionClient) Events(ctx context.Context, eventsOpts *execution.EventsRequest, opts ...grpc.CallOption) (execution.Tasks_EventsClient, error)
Events is a test implementation of execution.Events
func (*FakeExecutionClient) Exec ¶
func (f *FakeExecutionClient) Exec(ctx context.Context, execOpts *execution.ExecRequest, opts ...grpc.CallOption) (*execution.ExecResponse, error)
Exec is a test implementation of execution.Exec
func (*FakeExecutionClient) GetCalledDetails ¶
func (f *FakeExecutionClient) GetCalledDetails() []CalledDetail
GetCalledDetails get detail of each call.
func (*FakeExecutionClient) GetCalledNames ¶
func (f *FakeExecutionClient) GetCalledNames() []string
GetCalledNames get names of call
func (*FakeExecutionClient) Info ¶
func (f *FakeExecutionClient) Info(ctx context.Context, infoOpts *execution.InfoRequest, opts ...grpc.CallOption) (*execution.InfoResponse, error)
Info is a test implementation of execution.Info
func (*FakeExecutionClient) InjectError ¶
func (f *FakeExecutionClient) InjectError(fn string, err error)
InjectError inject error for call
func (*FakeExecutionClient) InjectErrors ¶
func (f *FakeExecutionClient) InjectErrors(errs map[string]error)
InjectErrors inject errors for calls
func (*FakeExecutionClient) Kill ¶
func (f *FakeExecutionClient) Kill(ctx context.Context, killOpts *execution.KillRequest, opts ...grpc.CallOption) (*googleprotobuf.Empty, error)
Kill is a test implementation of execution.Kill
func (*FakeExecutionClient) List ¶
func (f *FakeExecutionClient) List(ctx context.Context, listOpts *execution.ListRequest, opts ...grpc.CallOption) (*execution.ListResponse, error)
List is a test implementation of execution.List
func (*FakeExecutionClient) Pause ¶
func (f *FakeExecutionClient) Pause(ctx context.Context, in *execution.PauseRequest, opts ...grpc.CallOption) (*googleprotobuf.Empty, error)
Pause is a test implementation of execution.Pause
func (*FakeExecutionClient) Processes ¶
func (f *FakeExecutionClient) Processes(ctx context.Context, in *execution.ProcessesRequest, opts ...grpc.CallOption) (*execution.ProcessesResponse, error)
Processes is a test implementation of execution.Processes
func (*FakeExecutionClient) Pty ¶
func (f *FakeExecutionClient) Pty(ctx context.Context, ptyOpts *execution.PtyRequest, opts ...grpc.CallOption) (*googleprotobuf.Empty, error)
Pty is a test implementation of execution.Pty
func (*FakeExecutionClient) Resume ¶
func (f *FakeExecutionClient) Resume(ctx context.Context, in *execution.ResumeRequest, opts ...grpc.CallOption) (*googleprotobuf.Empty, error)
Resume is a test implementation of execution.Resume
func (*FakeExecutionClient) SetFakeTasks ¶
func (f *FakeExecutionClient) SetFakeTasks(tasks []task.Task)
SetFakeTasks injects fake tasks.
func (*FakeExecutionClient) Start ¶
func (f *FakeExecutionClient) Start(ctx context.Context, startOpts *execution.StartRequest, opts ...grpc.CallOption) (*googleprotobuf.Empty, error)
Start is a test implementation of execution.Start
func (*FakeExecutionClient) Stop ¶
func (f *FakeExecutionClient) Stop()
Stop the fake execution service. Needed when event is enabled.
func (*FakeExecutionClient) WithEvents ¶
func (f *FakeExecutionClient) WithEvents() *FakeExecutionClient
WithEvents setup events publisher for FakeExecutionClient
type FakeImagesClient ¶
type FakeImagesClient struct { sync.Mutex ImageList map[string]images.Image // contains filtered or unexported fields }
FakeImagesClient is a simple fake images client, so that cri-containerd can be run for testing without requiring a real containerd setup.
func NewFakeImagesClient ¶
func NewFakeImagesClient() *FakeImagesClient
NewFakeImagesClient creates a FakeImagesClient
func (*FakeImagesClient) ClearErrors ¶
func (f *FakeImagesClient) ClearErrors()
ClearErrors clear errors for call
func (*FakeImagesClient) Delete ¶
func (f *FakeImagesClient) Delete(ctx context.Context, deleteOpts *images.DeleteRequest, opts ...grpc.CallOption) (*googleprotobuf.Empty, error)
Delete is a test implementation of images.Delete
func (*FakeImagesClient) Get ¶
func (f *FakeImagesClient) Get(ctx context.Context, getOpts *images.GetRequest, opts ...grpc.CallOption) (*images.GetResponse, error)
Get is a test implementation of images.Get
func (*FakeImagesClient) GetCalledNames ¶
func (f *FakeImagesClient) GetCalledNames() []string
GetCalledNames get names of call
func (*FakeImagesClient) InjectError ¶
func (f *FakeImagesClient) InjectError(fn string, err error)
InjectError inject error for call
func (*FakeImagesClient) InjectErrors ¶
func (f *FakeImagesClient) InjectErrors(errs map[string]error)
InjectErrors inject errors for calls
func (*FakeImagesClient) List ¶
func (f *FakeImagesClient) List(ctx context.Context, listOpts *images.ListRequest, opts ...grpc.CallOption) (*images.ListResponse, error)
List is a test implementation of images.List
func (*FakeImagesClient) Put ¶
func (f *FakeImagesClient) Put(ctx context.Context, putOpts *images.PutRequest, opts ...grpc.CallOption) (*googleprotobuf.Empty, error)
Put is a test implementation of images.Put
func (*FakeImagesClient) SetFakeImages ¶
func (f *FakeImagesClient) SetFakeImages(images []images.Image)
SetFakeImages injects fake images.
type FakeSnapshotClient ¶
type FakeSnapshotClient struct { sync.Mutex MountList map[string][]*mount.Mount // contains filtered or unexported fields }
FakeSnapshotClient is a simple fake snapshot client, so that cri-containerd can be run for testing without requiring a real containerd setup.
func NewFakeSnapshotClient ¶
func NewFakeSnapshotClient() *FakeSnapshotClient
NewFakeSnapshotClient creates a FakeSnapshotClient
func (*FakeSnapshotClient) ClearErrors ¶
func (f *FakeSnapshotClient) ClearErrors()
ClearErrors clear errors for call
func (*FakeSnapshotClient) Commit ¶
func (f *FakeSnapshotClient) Commit(ctx context.Context, in *snapshot.CommitRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
Commit is a test implementation of snapshot.Commit
func (*FakeSnapshotClient) GetCalledDetails ¶
func (f *FakeSnapshotClient) GetCalledDetails() []CalledDetail
GetCalledDetails get detail of each call.
func (*FakeSnapshotClient) GetCalledNames ¶
func (f *FakeSnapshotClient) GetCalledNames() []string
GetCalledNames get names of call
func (*FakeSnapshotClient) InjectError ¶
func (f *FakeSnapshotClient) InjectError(fn string, err error)
InjectError inject error for call
func (*FakeSnapshotClient) InjectErrors ¶
func (f *FakeSnapshotClient) InjectErrors(errs map[string]error)
InjectErrors inject errors for calls
func (*FakeSnapshotClient) List ¶
func (f *FakeSnapshotClient) List(ctx context.Context, in *snapshot.ListRequest, opts ...grpc.CallOption) (snapshot.Snapshot_ListClient, error)
List is a test implementation of snapshot.List
func (*FakeSnapshotClient) ListMounts ¶
func (f *FakeSnapshotClient) ListMounts() [][]*mount.Mount
ListMounts lists all the fake mounts.
func (*FakeSnapshotClient) Mounts ¶
func (f *FakeSnapshotClient) Mounts(ctx context.Context, mountsOpts *snapshot.MountsRequest, opts ...grpc.CallOption) (*snapshot.MountsResponse, error)
Mounts is a test implementation of snapshot.Mounts
func (*FakeSnapshotClient) Prepare ¶
func (f *FakeSnapshotClient) Prepare(ctx context.Context, prepareOpts *snapshot.PrepareRequest, opts ...grpc.CallOption) (*snapshot.MountsResponse, error)
Prepare is a test implementation of snapshot.Prepare
func (*FakeSnapshotClient) Remove ¶
func (f *FakeSnapshotClient) Remove(ctx context.Context, removeOpts *snapshot.RemoveRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
Remove is a test implementation of snapshot.Remove
func (*FakeSnapshotClient) SetFakeMounts ¶
func (f *FakeSnapshotClient) SetFakeMounts(name string, mounts []*mount.Mount)
SetFakeMounts injects fake mounts.
func (*FakeSnapshotClient) Stat ¶
func (f *FakeSnapshotClient) Stat(ctx context.Context, in *snapshot.StatRequest, opts ...grpc.CallOption) (*snapshot.StatResponse, error)
Stat is a test implementation of snapshot.Stat
func (*FakeSnapshotClient) Usage ¶
func (f *FakeSnapshotClient) Usage(ctx context.Context, in *snapshot.UsageRequest, opts ...grpc.CallOption) (*snapshot.UsageResponse, error)
Usage is a test implementation of snapshot.Usage
func (*FakeSnapshotClient) View ¶
func (f *FakeSnapshotClient) View(ctx context.Context, viewOpts *snapshot.PrepareRequest, opts ...grpc.CallOption) (*snapshot.MountsResponse, error)
View is a test implementation of snapshot.View
type MockHealthClient ¶
type MockHealthClient struct {
// contains filtered or unexported fields
}
Mock of HealthClient interface
func NewMockHealthClient ¶
func NewMockHealthClient(ctrl *gomock.Controller) *MockHealthClient
func (*MockHealthClient) Check ¶
func (_m *MockHealthClient) Check(_param0 context.Context, _param1 *grpc_health_v1.HealthCheckRequest, _param2 ...grpc.CallOption) (*grpc_health_v1.HealthCheckResponse, error)
func (*MockHealthClient) EXPECT ¶
func (_m *MockHealthClient) EXPECT() *_MockHealthClientRecorder
type MockVersionClient ¶
type MockVersionClient struct {
// contains filtered or unexported fields
}
Mock of VersionClient interface
func NewMockVersionClient ¶
func NewMockVersionClient(ctrl *gomock.Controller) *MockVersionClient
func (*MockVersionClient) EXPECT ¶
func (_m *MockVersionClient) EXPECT() *_MockVersionClientRecorder
func (*MockVersionClient) Version ¶
func (_m *MockVersionClient) Version(_param0 context.Context, _param1 *empty.Empty, _param2 ...grpc.CallOption) (*version.VersionResponse, error)