Documentation ¶
Overview ¶
TODO: credits (based on fake_image_service.go and cri_stats_provider_test.go from k8s)
TODO: credits (based on fake_image_service.go and cri_stats_provider_test.go from k8s)
Index ¶
- Variables
- func BuildContainerName110(metadata *runtimeapi.ContainerMetadata, sandboxID string) string
- func BuildContainerName19(metadata *runtimeapi.ContainerMetadata, sandboxID string) string
- func BuildSandboxName110(metadata *runtimeapi.PodSandboxMetadata) string
- func BuildSandboxName19(metadata *runtimeapi.PodSandboxMetadata) string
- func MakeFakeContainerStats110(id string, metadata *runtimeapi.ContainerMetadata, imageFsUUID string) *runtimeapi.ContainerStats
- func MakeFakeContainerStats19(id string, metadata *runtimeapi.ContainerMetadata, imageFsUUID string) *runtimeapi.ContainerStats
- func MakeFakeImageFsUsage110(fsUUID string) *runtimeapi.FilesystemUsage
- func MakeFakeImageFsUsage19(fsUUID string) *runtimeapi.FilesystemUsage
- type FakeContainer110
- type FakeContainer19
- type FakeCriServer
- type FakeCriServer110
- func (s *FakeCriServer110) CurrentTime() int64
- func (s FakeCriServer110) Serve(addr string, readyCh chan struct{}) error
- func (s *FakeCriServer110) SetFakeContainerStats(containerId, containerName, imageFsUUID string) interface{}
- func (s *FakeCriServer110) SetFakeFilesystemUsage(imageFsUUID string) interface{}
- func (s FakeCriServer110) Stop()
- type FakeCriServer19
- func (s *FakeCriServer19) CurrentTime() int64
- func (s FakeCriServer19) Serve(addr string, readyCh chan struct{}) error
- func (s *FakeCriServer19) SetFakeContainerStats(containerId, containerName, imageFsUUID string) interface{}
- func (s *FakeCriServer19) SetFakeFilesystemUsage(imageFsUUID string) interface{}
- func (s FakeCriServer19) Stop()
- type FakeImageServer110
- func (r *FakeImageServer110) ImageFsInfo(ctx context.Context, in *runtimeapi.ImageFsInfoRequest) (*runtimeapi.ImageFsInfoResponse, error)
- func (r *FakeImageServer110) ImageStatus(ctx context.Context, in *runtimeapi.ImageStatusRequest) (*runtimeapi.ImageStatusResponse, error)
- func (r *FakeImageServer110) ListImages(ctx context.Context, in *runtimeapi.ListImagesRequest) (*runtimeapi.ListImagesResponse, error)
- func (r *FakeImageServer110) PullImage(ctx context.Context, in *runtimeapi.PullImageRequest) (*runtimeapi.PullImageResponse, error)
- func (r *FakeImageServer110) RemoveImage(ctx context.Context, in *runtimeapi.RemoveImageRequest) (*runtimeapi.RemoveImageResponse, error)
- func (r *FakeImageServer110) SetFakeFilesystemUsage(usage []*runtimeapi.FilesystemUsage)
- func (r *FakeImageServer110) SetFakeImageSize(size uint64)
- func (r *FakeImageServer110) SetFakeImages(images []string)
- type FakeImageServer19
- func (r *FakeImageServer19) ImageFsInfo(ctx context.Context, in *runtimeapi.ImageFsInfoRequest) (*runtimeapi.ImageFsInfoResponse, error)
- func (r *FakeImageServer19) ImageStatus(ctx context.Context, in *runtimeapi.ImageStatusRequest) (*runtimeapi.ImageStatusResponse, error)
- func (r *FakeImageServer19) ListImages(ctx context.Context, in *runtimeapi.ListImagesRequest) (*runtimeapi.ListImagesResponse, error)
- func (r *FakeImageServer19) PullImage(ctx context.Context, in *runtimeapi.PullImageRequest) (*runtimeapi.PullImageResponse, error)
- func (r *FakeImageServer19) RemoveImage(ctx context.Context, in *runtimeapi.RemoveImageRequest) (*runtimeapi.RemoveImageResponse, error)
- func (r *FakeImageServer19) SetFakeFilesystemUsage(usage []*runtimeapi.FilesystemUsage)
- func (r *FakeImageServer19) SetFakeImageSize(size uint64)
- func (r *FakeImageServer19) SetFakeImages(images []string)
- type FakePodSandbox110
- type FakePodSandbox19
- type FakeRuntimeServer110
- func (r *FakeRuntimeServer110) Attach(ctx context.Context, in *runtimeapi.AttachRequest) (*runtimeapi.AttachResponse, error)
- func (r *FakeRuntimeServer110) ContainerStats(ctx context.Context, in *runtimeapi.ContainerStatsRequest) (*runtimeapi.ContainerStatsResponse, error)
- func (r *FakeRuntimeServer110) ContainerStatus(ctx context.Context, in *runtimeapi.ContainerStatusRequest) (*runtimeapi.ContainerStatusResponse, error)
- func (r *FakeRuntimeServer110) CreateContainer(ctx context.Context, in *runtimeapi.CreateContainerRequest) (*runtimeapi.CreateContainerResponse, error)
- func (r *FakeRuntimeServer110) Exec(ctx context.Context, in *runtimeapi.ExecRequest) (*runtimeapi.ExecResponse, error)
- func (r *FakeRuntimeServer110) ExecSync(ctx context.Context, in *runtimeapi.ExecSyncRequest) (*runtimeapi.ExecSyncResponse, error)
- func (r *FakeRuntimeServer110) ListContainerStats(ctx context.Context, in *runtimeapi.ListContainerStatsRequest) (*runtimeapi.ListContainerStatsResponse, error)
- func (r *FakeRuntimeServer110) ListContainers(ctx context.Context, in *runtimeapi.ListContainersRequest) (*runtimeapi.ListContainersResponse, error)
- func (r *FakeRuntimeServer110) ListPodSandbox(ctx context.Context, in *runtimeapi.ListPodSandboxRequest) (*runtimeapi.ListPodSandboxResponse, error)
- func (r *FakeRuntimeServer110) PodSandboxStatus(ctx context.Context, in *runtimeapi.PodSandboxStatusRequest) (*runtimeapi.PodSandboxStatusResponse, error)
- func (r *FakeRuntimeServer110) PortForward(ctx context.Context, in *runtimeapi.PortForwardRequest) (*runtimeapi.PortForwardResponse, error)
- func (r *FakeRuntimeServer110) RemoveContainer(ctx context.Context, in *runtimeapi.RemoveContainerRequest) (*runtimeapi.RemoveContainerResponse, error)
- func (r *FakeRuntimeServer110) RemovePodSandbox(ctx context.Context, in *runtimeapi.RemovePodSandboxRequest) (*runtimeapi.RemovePodSandboxResponse, error)
- func (r *FakeRuntimeServer110) ReopenContainerLog(ctx context.Context, in *runtimeapi.ReopenContainerLogRequest) (*runtimeapi.ReopenContainerLogResponse, error)
- func (r *FakeRuntimeServer110) RunPodSandbox(ctx context.Context, in *runtimeapi.RunPodSandboxRequest) (*runtimeapi.RunPodSandboxResponse, error)
- func (r *FakeRuntimeServer110) SetFakeContainerStats(containerStats []*runtimeapi.ContainerStats)
- func (r *FakeRuntimeServer110) SetFakeContainers(containers []*FakeContainer110)
- func (r *FakeRuntimeServer110) SetFakeSandboxes(sandboxes []*FakePodSandbox110)
- func (r *FakeRuntimeServer110) StartContainer(ctx context.Context, in *runtimeapi.StartContainerRequest) (*runtimeapi.StartContainerResponse, error)
- func (r *FakeRuntimeServer110) Status(ctx context.Context, in *runtimeapi.StatusRequest) (*runtimeapi.StatusResponse, error)
- func (r *FakeRuntimeServer110) StopContainer(ctx context.Context, in *runtimeapi.StopContainerRequest) (*runtimeapi.StopContainerResponse, error)
- func (r *FakeRuntimeServer110) StopPodSandbox(ctx context.Context, in *runtimeapi.StopPodSandboxRequest) (*runtimeapi.StopPodSandboxResponse, error)
- func (r *FakeRuntimeServer110) UpdateContainerResources(ctx context.Context, in *runtimeapi.UpdateContainerResourcesRequest) (*runtimeapi.UpdateContainerResourcesResponse, error)
- func (r *FakeRuntimeServer110) UpdateRuntimeConfig(ctx context.Context, in *runtimeapi.UpdateRuntimeConfigRequest) (*runtimeapi.UpdateRuntimeConfigResponse, error)
- func (r *FakeRuntimeServer110) Version(ctx context.Context, in *runtimeapi.VersionRequest) (*runtimeapi.VersionResponse, error)
- type FakeRuntimeServer19
- func (r *FakeRuntimeServer19) Attach(ctx context.Context, in *runtimeapi.AttachRequest) (*runtimeapi.AttachResponse, error)
- func (r *FakeRuntimeServer19) ContainerStats(ctx context.Context, in *runtimeapi.ContainerStatsRequest) (*runtimeapi.ContainerStatsResponse, error)
- func (r *FakeRuntimeServer19) ContainerStatus(ctx context.Context, in *runtimeapi.ContainerStatusRequest) (*runtimeapi.ContainerStatusResponse, error)
- func (r *FakeRuntimeServer19) CreateContainer(ctx context.Context, in *runtimeapi.CreateContainerRequest) (*runtimeapi.CreateContainerResponse, error)
- func (r *FakeRuntimeServer19) Exec(ctx context.Context, in *runtimeapi.ExecRequest) (*runtimeapi.ExecResponse, error)
- func (r *FakeRuntimeServer19) ExecSync(ctx context.Context, in *runtimeapi.ExecSyncRequest) (*runtimeapi.ExecSyncResponse, error)
- func (r *FakeRuntimeServer19) ListContainerStats(ctx context.Context, in *runtimeapi.ListContainerStatsRequest) (*runtimeapi.ListContainerStatsResponse, error)
- func (r *FakeRuntimeServer19) ListContainers(ctx context.Context, in *runtimeapi.ListContainersRequest) (*runtimeapi.ListContainersResponse, error)
- func (r *FakeRuntimeServer19) ListPodSandbox(ctx context.Context, in *runtimeapi.ListPodSandboxRequest) (*runtimeapi.ListPodSandboxResponse, error)
- func (r *FakeRuntimeServer19) PodSandboxStatus(ctx context.Context, in *runtimeapi.PodSandboxStatusRequest) (*runtimeapi.PodSandboxStatusResponse, error)
- func (r *FakeRuntimeServer19) PortForward(ctx context.Context, in *runtimeapi.PortForwardRequest) (*runtimeapi.PortForwardResponse, error)
- func (r *FakeRuntimeServer19) RemoveContainer(ctx context.Context, in *runtimeapi.RemoveContainerRequest) (*runtimeapi.RemoveContainerResponse, error)
- func (r *FakeRuntimeServer19) RemovePodSandbox(ctx context.Context, in *runtimeapi.RemovePodSandboxRequest) (*runtimeapi.RemovePodSandboxResponse, error)
- func (r *FakeRuntimeServer19) RunPodSandbox(ctx context.Context, in *runtimeapi.RunPodSandboxRequest) (*runtimeapi.RunPodSandboxResponse, error)
- func (r *FakeRuntimeServer19) SetFakeContainerStats(containerStats []*runtimeapi.ContainerStats)
- func (r *FakeRuntimeServer19) SetFakeContainers(containers []*FakeContainer19)
- func (r *FakeRuntimeServer19) SetFakeSandboxes(sandboxes []*FakePodSandbox19)
- func (r *FakeRuntimeServer19) StartContainer(ctx context.Context, in *runtimeapi.StartContainerRequest) (*runtimeapi.StartContainerResponse, error)
- func (r *FakeRuntimeServer19) Status(ctx context.Context, in *runtimeapi.StatusRequest) (*runtimeapi.StatusResponse, error)
- func (r *FakeRuntimeServer19) StopContainer(ctx context.Context, in *runtimeapi.StopContainerRequest) (*runtimeapi.StopContainerResponse, error)
- func (r *FakeRuntimeServer19) StopPodSandbox(ctx context.Context, in *runtimeapi.StopPodSandboxRequest) (*runtimeapi.StopPodSandboxResponse, error)
- func (r *FakeRuntimeServer19) UpdateContainerResources(ctx context.Context, in *runtimeapi.UpdateContainerResourcesRequest) (*runtimeapi.UpdateContainerResourcesResponse, error)
- func (r *FakeRuntimeServer19) UpdateRuntimeConfig(ctx context.Context, in *runtimeapi.UpdateRuntimeConfigRequest) (*runtimeapi.UpdateRuntimeConfigResponse, error)
- func (r *FakeRuntimeServer19) Version(ctx context.Context, in *runtimeapi.VersionRequest) (*runtimeapi.VersionResponse, error)
- type Journal
- type PrefixJournal
- type SimpleJournal
Constants ¶
This section is empty.
Variables ¶
var ( FakeRuntimeName = "fakeRuntime" FakePodSandboxIP = "192.168.192.168" )
Functions ¶
func BuildContainerName110 ¶ added in v0.11.0
func BuildContainerName110(metadata *runtimeapi.ContainerMetadata, sandboxID string) string
func BuildContainerName19 ¶ added in v0.11.0
func BuildContainerName19(metadata *runtimeapi.ContainerMetadata, sandboxID string) string
func BuildSandboxName110 ¶ added in v0.11.0
func BuildSandboxName110(metadata *runtimeapi.PodSandboxMetadata) string
func BuildSandboxName19 ¶ added in v0.11.0
func BuildSandboxName19(metadata *runtimeapi.PodSandboxMetadata) string
func MakeFakeContainerStats110 ¶ added in v0.11.0
func MakeFakeContainerStats110(id string, metadata *runtimeapi.ContainerMetadata, imageFsUUID string) *runtimeapi.ContainerStats
func MakeFakeContainerStats19 ¶ added in v0.11.0
func MakeFakeContainerStats19(id string, metadata *runtimeapi.ContainerMetadata, imageFsUUID string) *runtimeapi.ContainerStats
func MakeFakeImageFsUsage110 ¶ added in v0.11.0
func MakeFakeImageFsUsage110(fsUUID string) *runtimeapi.FilesystemUsage
func MakeFakeImageFsUsage19 ¶ added in v0.11.0
func MakeFakeImageFsUsage19(fsUUID string) *runtimeapi.FilesystemUsage
Types ¶
type FakeContainer110 ¶ added in v0.11.0
type FakeContainer110 struct { // ContainerStatus contains the runtime information for a container. runtimeapi.ContainerStatus // the sandbox id of this container SandboxID string }
type FakeContainer19 ¶ added in v0.11.0
type FakeContainer19 struct { // ContainerStatus contains the runtime information for a container. runtimeapi.ContainerStatus // the sandbox id of this container SandboxID string }
type FakeCriServer ¶
type FakeCriServer interface { Serve(addr string, readyCh chan struct{}) error Stop() SetFakeImages(images []string) SetFakeImageSize(size uint64) SetFakeContainerStats(containerId, containerName, imageFsUUID string) interface{} SetFakeFilesystemUsage(imageFsUUID string) interface{} CurrentTime() int64 }
func NewFakeCriServer110 ¶ added in v0.11.0
func NewFakeCriServer110(journal Journal, streamUrl string) FakeCriServer
func NewFakeCriServer19 ¶ added in v0.11.0
func NewFakeCriServer19(journal Journal, streamUrl string) FakeCriServer
type FakeCriServer110 ¶ added in v0.11.0
type FakeCriServer110 struct { *FakeRuntimeServer110 *FakeImageServer110 // contains filtered or unexported fields }
func (*FakeCriServer110) CurrentTime ¶ added in v0.11.0
func (s *FakeCriServer110) CurrentTime() int64
func (*FakeCriServer110) SetFakeContainerStats ¶ added in v0.11.0
func (s *FakeCriServer110) SetFakeContainerStats(containerId, containerName, imageFsUUID string) interface{}
func (*FakeCriServer110) SetFakeFilesystemUsage ¶ added in v0.11.0
func (s *FakeCriServer110) SetFakeFilesystemUsage(imageFsUUID string) interface{}
type FakeCriServer19 ¶ added in v0.11.0
type FakeCriServer19 struct { *FakeRuntimeServer19 *FakeImageServer19 // contains filtered or unexported fields }
func (*FakeCriServer19) CurrentTime ¶ added in v0.11.0
func (s *FakeCriServer19) CurrentTime() int64
func (*FakeCriServer19) SetFakeContainerStats ¶ added in v0.11.0
func (s *FakeCriServer19) SetFakeContainerStats(containerId, containerName, imageFsUUID string) interface{}
func (*FakeCriServer19) SetFakeFilesystemUsage ¶ added in v0.11.0
func (s *FakeCriServer19) SetFakeFilesystemUsage(imageFsUUID string) interface{}
type FakeImageServer110 ¶ added in v0.11.0
type FakeImageServer110 struct { sync.Mutex FakeImageSize uint64 Images map[string]*runtimeapi.Image FakeFilesystemUsage []*runtimeapi.FilesystemUsage // contains filtered or unexported fields }
func NewFakeImageServer110 ¶ added in v0.11.0
func NewFakeImageServer110(journal Journal) *FakeImageServer110
func (*FakeImageServer110) ImageFsInfo ¶ added in v0.11.0
func (r *FakeImageServer110) ImageFsInfo(ctx context.Context, in *runtimeapi.ImageFsInfoRequest) (*runtimeapi.ImageFsInfoResponse, error)
func (*FakeImageServer110) ImageStatus ¶ added in v0.11.0
func (r *FakeImageServer110) ImageStatus(ctx context.Context, in *runtimeapi.ImageStatusRequest) (*runtimeapi.ImageStatusResponse, error)
func (*FakeImageServer110) ListImages ¶ added in v0.11.0
func (r *FakeImageServer110) ListImages(ctx context.Context, in *runtimeapi.ListImagesRequest) (*runtimeapi.ListImagesResponse, error)
func (*FakeImageServer110) PullImage ¶ added in v0.11.0
func (r *FakeImageServer110) PullImage(ctx context.Context, in *runtimeapi.PullImageRequest) (*runtimeapi.PullImageResponse, error)
func (*FakeImageServer110) RemoveImage ¶ added in v0.11.0
func (r *FakeImageServer110) RemoveImage(ctx context.Context, in *runtimeapi.RemoveImageRequest) (*runtimeapi.RemoveImageResponse, error)
func (*FakeImageServer110) SetFakeFilesystemUsage ¶ added in v0.11.0
func (r *FakeImageServer110) SetFakeFilesystemUsage(usage []*runtimeapi.FilesystemUsage)
func (*FakeImageServer110) SetFakeImageSize ¶ added in v0.11.0
func (r *FakeImageServer110) SetFakeImageSize(size uint64)
func (*FakeImageServer110) SetFakeImages ¶ added in v0.11.0
func (r *FakeImageServer110) SetFakeImages(images []string)
type FakeImageServer19 ¶ added in v0.11.0
type FakeImageServer19 struct { sync.Mutex FakeImageSize uint64 Images map[string]*runtimeapi.Image FakeFilesystemUsage []*runtimeapi.FilesystemUsage // contains filtered or unexported fields }
func NewFakeImageServer19 ¶ added in v0.11.0
func NewFakeImageServer19(journal Journal) *FakeImageServer19
func (*FakeImageServer19) ImageFsInfo ¶ added in v0.11.0
func (r *FakeImageServer19) ImageFsInfo(ctx context.Context, in *runtimeapi.ImageFsInfoRequest) (*runtimeapi.ImageFsInfoResponse, error)
func (*FakeImageServer19) ImageStatus ¶ added in v0.11.0
func (r *FakeImageServer19) ImageStatus(ctx context.Context, in *runtimeapi.ImageStatusRequest) (*runtimeapi.ImageStatusResponse, error)
func (*FakeImageServer19) ListImages ¶ added in v0.11.0
func (r *FakeImageServer19) ListImages(ctx context.Context, in *runtimeapi.ListImagesRequest) (*runtimeapi.ListImagesResponse, error)
func (*FakeImageServer19) PullImage ¶ added in v0.11.0
func (r *FakeImageServer19) PullImage(ctx context.Context, in *runtimeapi.PullImageRequest) (*runtimeapi.PullImageResponse, error)
func (*FakeImageServer19) RemoveImage ¶ added in v0.11.0
func (r *FakeImageServer19) RemoveImage(ctx context.Context, in *runtimeapi.RemoveImageRequest) (*runtimeapi.RemoveImageResponse, error)
func (*FakeImageServer19) SetFakeFilesystemUsage ¶ added in v0.11.0
func (r *FakeImageServer19) SetFakeFilesystemUsage(usage []*runtimeapi.FilesystemUsage)
func (*FakeImageServer19) SetFakeImageSize ¶ added in v0.11.0
func (r *FakeImageServer19) SetFakeImageSize(size uint64)
func (*FakeImageServer19) SetFakeImages ¶ added in v0.11.0
func (r *FakeImageServer19) SetFakeImages(images []string)
type FakePodSandbox110 ¶ added in v0.11.0
type FakePodSandbox110 struct { // PodSandboxStatus contains the runtime information for a sandbox. runtimeapi.PodSandboxStatus }
type FakePodSandbox19 ¶ added in v0.11.0
type FakePodSandbox19 struct { // PodSandboxStatus contains the runtime information for a sandbox. runtimeapi.PodSandboxStatus }
type FakeRuntimeServer110 ¶ added in v0.11.0
type FakeRuntimeServer110 struct { sync.Mutex CurrentTime int64 FakeStatus *runtimeapi.RuntimeStatus Containers map[string]*FakeContainer110 Sandboxes map[string]*FakePodSandbox110 FakeContainerStats map[string]*runtimeapi.ContainerStats // contains filtered or unexported fields }
func NewFakeRuntimeServer110 ¶ added in v0.11.0
func NewFakeRuntimeServer110(journal Journal, streamUrl string) *FakeRuntimeServer110
func (*FakeRuntimeServer110) Attach ¶ added in v0.11.0
func (r *FakeRuntimeServer110) Attach(ctx context.Context, in *runtimeapi.AttachRequest) (*runtimeapi.AttachResponse, error)
func (*FakeRuntimeServer110) ContainerStats ¶ added in v0.11.0
func (r *FakeRuntimeServer110) ContainerStats(ctx context.Context, in *runtimeapi.ContainerStatsRequest) (*runtimeapi.ContainerStatsResponse, error)
func (*FakeRuntimeServer110) ContainerStatus ¶ added in v0.11.0
func (r *FakeRuntimeServer110) ContainerStatus(ctx context.Context, in *runtimeapi.ContainerStatusRequest) (*runtimeapi.ContainerStatusResponse, error)
func (*FakeRuntimeServer110) CreateContainer ¶ added in v0.11.0
func (r *FakeRuntimeServer110) CreateContainer(ctx context.Context, in *runtimeapi.CreateContainerRequest) (*runtimeapi.CreateContainerResponse, error)
func (*FakeRuntimeServer110) Exec ¶ added in v0.11.0
func (r *FakeRuntimeServer110) Exec(ctx context.Context, in *runtimeapi.ExecRequest) (*runtimeapi.ExecResponse, error)
func (*FakeRuntimeServer110) ExecSync ¶ added in v0.11.0
func (r *FakeRuntimeServer110) ExecSync(ctx context.Context, in *runtimeapi.ExecSyncRequest) (*runtimeapi.ExecSyncResponse, error)
func (*FakeRuntimeServer110) ListContainerStats ¶ added in v0.11.0
func (r *FakeRuntimeServer110) ListContainerStats(ctx context.Context, in *runtimeapi.ListContainerStatsRequest) (*runtimeapi.ListContainerStatsResponse, error)
func (*FakeRuntimeServer110) ListContainers ¶ added in v0.11.0
func (r *FakeRuntimeServer110) ListContainers(ctx context.Context, in *runtimeapi.ListContainersRequest) (*runtimeapi.ListContainersResponse, error)
func (*FakeRuntimeServer110) ListPodSandbox ¶ added in v0.11.0
func (r *FakeRuntimeServer110) ListPodSandbox(ctx context.Context, in *runtimeapi.ListPodSandboxRequest) (*runtimeapi.ListPodSandboxResponse, error)
func (*FakeRuntimeServer110) PodSandboxStatus ¶ added in v0.11.0
func (r *FakeRuntimeServer110) PodSandboxStatus(ctx context.Context, in *runtimeapi.PodSandboxStatusRequest) (*runtimeapi.PodSandboxStatusResponse, error)
func (*FakeRuntimeServer110) PortForward ¶ added in v0.11.0
func (r *FakeRuntimeServer110) PortForward(ctx context.Context, in *runtimeapi.PortForwardRequest) (*runtimeapi.PortForwardResponse, error)
func (*FakeRuntimeServer110) RemoveContainer ¶ added in v0.11.0
func (r *FakeRuntimeServer110) RemoveContainer(ctx context.Context, in *runtimeapi.RemoveContainerRequest) (*runtimeapi.RemoveContainerResponse, error)
func (*FakeRuntimeServer110) RemovePodSandbox ¶ added in v0.11.0
func (r *FakeRuntimeServer110) RemovePodSandbox(ctx context.Context, in *runtimeapi.RemovePodSandboxRequest) (*runtimeapi.RemovePodSandboxResponse, error)
func (*FakeRuntimeServer110) ReopenContainerLog ¶ added in v0.11.0
func (r *FakeRuntimeServer110) ReopenContainerLog(ctx context.Context, in *runtimeapi.ReopenContainerLogRequest) (*runtimeapi.ReopenContainerLogResponse, error)
func (*FakeRuntimeServer110) RunPodSandbox ¶ added in v0.11.0
func (r *FakeRuntimeServer110) RunPodSandbox(ctx context.Context, in *runtimeapi.RunPodSandboxRequest) (*runtimeapi.RunPodSandboxResponse, error)
func (*FakeRuntimeServer110) SetFakeContainerStats ¶ added in v0.11.0
func (r *FakeRuntimeServer110) SetFakeContainerStats(containerStats []*runtimeapi.ContainerStats)
func (*FakeRuntimeServer110) SetFakeContainers ¶ added in v0.11.0
func (r *FakeRuntimeServer110) SetFakeContainers(containers []*FakeContainer110)
func (*FakeRuntimeServer110) SetFakeSandboxes ¶ added in v0.11.0
func (r *FakeRuntimeServer110) SetFakeSandboxes(sandboxes []*FakePodSandbox110)
func (*FakeRuntimeServer110) StartContainer ¶ added in v0.11.0
func (r *FakeRuntimeServer110) StartContainer(ctx context.Context, in *runtimeapi.StartContainerRequest) (*runtimeapi.StartContainerResponse, error)
func (*FakeRuntimeServer110) Status ¶ added in v0.11.0
func (r *FakeRuntimeServer110) Status(ctx context.Context, in *runtimeapi.StatusRequest) (*runtimeapi.StatusResponse, error)
func (*FakeRuntimeServer110) StopContainer ¶ added in v0.11.0
func (r *FakeRuntimeServer110) StopContainer(ctx context.Context, in *runtimeapi.StopContainerRequest) (*runtimeapi.StopContainerResponse, error)
func (*FakeRuntimeServer110) StopPodSandbox ¶ added in v0.11.0
func (r *FakeRuntimeServer110) StopPodSandbox(ctx context.Context, in *runtimeapi.StopPodSandboxRequest) (*runtimeapi.StopPodSandboxResponse, error)
func (*FakeRuntimeServer110) UpdateContainerResources ¶ added in v0.11.0
func (r *FakeRuntimeServer110) UpdateContainerResources(ctx context.Context, in *runtimeapi.UpdateContainerResourcesRequest) (*runtimeapi.UpdateContainerResourcesResponse, error)
func (*FakeRuntimeServer110) UpdateRuntimeConfig ¶ added in v0.11.0
func (r *FakeRuntimeServer110) UpdateRuntimeConfig(ctx context.Context, in *runtimeapi.UpdateRuntimeConfigRequest) (*runtimeapi.UpdateRuntimeConfigResponse, error)
func (*FakeRuntimeServer110) Version ¶ added in v0.11.0
func (r *FakeRuntimeServer110) Version(ctx context.Context, in *runtimeapi.VersionRequest) (*runtimeapi.VersionResponse, error)
type FakeRuntimeServer19 ¶ added in v0.11.0
type FakeRuntimeServer19 struct { sync.Mutex CurrentTime int64 FakeStatus *runtimeapi.RuntimeStatus Containers map[string]*FakeContainer19 Sandboxes map[string]*FakePodSandbox19 FakeContainerStats map[string]*runtimeapi.ContainerStats // contains filtered or unexported fields }
func NewFakeRuntimeServer19 ¶ added in v0.11.0
func NewFakeRuntimeServer19(journal Journal, streamUrl string) *FakeRuntimeServer19
func (*FakeRuntimeServer19) Attach ¶ added in v0.11.0
func (r *FakeRuntimeServer19) Attach(ctx context.Context, in *runtimeapi.AttachRequest) (*runtimeapi.AttachResponse, error)
func (*FakeRuntimeServer19) ContainerStats ¶ added in v0.11.0
func (r *FakeRuntimeServer19) ContainerStats(ctx context.Context, in *runtimeapi.ContainerStatsRequest) (*runtimeapi.ContainerStatsResponse, error)
func (*FakeRuntimeServer19) ContainerStatus ¶ added in v0.11.0
func (r *FakeRuntimeServer19) ContainerStatus(ctx context.Context, in *runtimeapi.ContainerStatusRequest) (*runtimeapi.ContainerStatusResponse, error)
func (*FakeRuntimeServer19) CreateContainer ¶ added in v0.11.0
func (r *FakeRuntimeServer19) CreateContainer(ctx context.Context, in *runtimeapi.CreateContainerRequest) (*runtimeapi.CreateContainerResponse, error)
func (*FakeRuntimeServer19) Exec ¶ added in v0.11.0
func (r *FakeRuntimeServer19) Exec(ctx context.Context, in *runtimeapi.ExecRequest) (*runtimeapi.ExecResponse, error)
func (*FakeRuntimeServer19) ExecSync ¶ added in v0.11.0
func (r *FakeRuntimeServer19) ExecSync(ctx context.Context, in *runtimeapi.ExecSyncRequest) (*runtimeapi.ExecSyncResponse, error)
func (*FakeRuntimeServer19) ListContainerStats ¶ added in v0.11.0
func (r *FakeRuntimeServer19) ListContainerStats(ctx context.Context, in *runtimeapi.ListContainerStatsRequest) (*runtimeapi.ListContainerStatsResponse, error)
func (*FakeRuntimeServer19) ListContainers ¶ added in v0.11.0
func (r *FakeRuntimeServer19) ListContainers(ctx context.Context, in *runtimeapi.ListContainersRequest) (*runtimeapi.ListContainersResponse, error)
func (*FakeRuntimeServer19) ListPodSandbox ¶ added in v0.11.0
func (r *FakeRuntimeServer19) ListPodSandbox(ctx context.Context, in *runtimeapi.ListPodSandboxRequest) (*runtimeapi.ListPodSandboxResponse, error)
func (*FakeRuntimeServer19) PodSandboxStatus ¶ added in v0.11.0
func (r *FakeRuntimeServer19) PodSandboxStatus(ctx context.Context, in *runtimeapi.PodSandboxStatusRequest) (*runtimeapi.PodSandboxStatusResponse, error)
func (*FakeRuntimeServer19) PortForward ¶ added in v0.11.0
func (r *FakeRuntimeServer19) PortForward(ctx context.Context, in *runtimeapi.PortForwardRequest) (*runtimeapi.PortForwardResponse, error)
func (*FakeRuntimeServer19) RemoveContainer ¶ added in v0.11.0
func (r *FakeRuntimeServer19) RemoveContainer(ctx context.Context, in *runtimeapi.RemoveContainerRequest) (*runtimeapi.RemoveContainerResponse, error)
func (*FakeRuntimeServer19) RemovePodSandbox ¶ added in v0.11.0
func (r *FakeRuntimeServer19) RemovePodSandbox(ctx context.Context, in *runtimeapi.RemovePodSandboxRequest) (*runtimeapi.RemovePodSandboxResponse, error)
func (*FakeRuntimeServer19) RunPodSandbox ¶ added in v0.11.0
func (r *FakeRuntimeServer19) RunPodSandbox(ctx context.Context, in *runtimeapi.RunPodSandboxRequest) (*runtimeapi.RunPodSandboxResponse, error)
func (*FakeRuntimeServer19) SetFakeContainerStats ¶ added in v0.11.0
func (r *FakeRuntimeServer19) SetFakeContainerStats(containerStats []*runtimeapi.ContainerStats)
func (*FakeRuntimeServer19) SetFakeContainers ¶ added in v0.11.0
func (r *FakeRuntimeServer19) SetFakeContainers(containers []*FakeContainer19)
func (*FakeRuntimeServer19) SetFakeSandboxes ¶ added in v0.11.0
func (r *FakeRuntimeServer19) SetFakeSandboxes(sandboxes []*FakePodSandbox19)
func (*FakeRuntimeServer19) StartContainer ¶ added in v0.11.0
func (r *FakeRuntimeServer19) StartContainer(ctx context.Context, in *runtimeapi.StartContainerRequest) (*runtimeapi.StartContainerResponse, error)
func (*FakeRuntimeServer19) Status ¶ added in v0.11.0
func (r *FakeRuntimeServer19) Status(ctx context.Context, in *runtimeapi.StatusRequest) (*runtimeapi.StatusResponse, error)
func (*FakeRuntimeServer19) StopContainer ¶ added in v0.11.0
func (r *FakeRuntimeServer19) StopContainer(ctx context.Context, in *runtimeapi.StopContainerRequest) (*runtimeapi.StopContainerResponse, error)
func (*FakeRuntimeServer19) StopPodSandbox ¶ added in v0.11.0
func (r *FakeRuntimeServer19) StopPodSandbox(ctx context.Context, in *runtimeapi.StopPodSandboxRequest) (*runtimeapi.StopPodSandboxResponse, error)
func (*FakeRuntimeServer19) UpdateContainerResources ¶ added in v0.11.0
func (r *FakeRuntimeServer19) UpdateContainerResources(ctx context.Context, in *runtimeapi.UpdateContainerResourcesRequest) (*runtimeapi.UpdateContainerResourcesResponse, error)
func (*FakeRuntimeServer19) UpdateRuntimeConfig ¶ added in v0.11.0
func (r *FakeRuntimeServer19) UpdateRuntimeConfig(ctx context.Context, in *runtimeapi.UpdateRuntimeConfigRequest) (*runtimeapi.UpdateRuntimeConfigResponse, error)
func (*FakeRuntimeServer19) Version ¶ added in v0.11.0
func (r *FakeRuntimeServer19) Version(ctx context.Context, in *runtimeapi.VersionRequest) (*runtimeapi.VersionResponse, error)
type Journal ¶
type Journal interface { // Record saves the specified item in the journal Record(item string) }
Journal records a series of events (items) represented as strings in a thread-safe way
type PrefixJournal ¶
type PrefixJournal struct {
// contains filtered or unexported fields
}
PrefixJournal is an implementation of Journal interface that prefixes every item passed to it with the specified prefix before passing it on to the underlying Journal
func NewPrefixJournal ¶
func NewPrefixJournal(journal Journal, prefix string) *PrefixJournal
NewPrefixJournal creates an instance of PrefixJournal with the specified underlying journal and prefix
func (*PrefixJournal) Record ¶
func (j *PrefixJournal) Record(item string)
Record implements Record method of Journal interface
type SimpleJournal ¶
SimpleJournal is an implementation of Journal that has methods for waiting for particular events and verifying journal contents
func NewSimpleJournal ¶
func NewSimpleJournal() *SimpleJournal
NewSimpleJournal creates an instance of SimpleJournal
func (*SimpleJournal) Record ¶
func (j *SimpleJournal) Record(item string)
Record implements Record method of Journal interface
func (*SimpleJournal) Skip ¶ added in v0.11.0
func (j *SimpleJournal) Skip(item string)
Skip makes SimpleJournal skip the specified items when they occur
func (*SimpleJournal) Verify ¶
func (j *SimpleJournal) Verify(expectedItems []string) error
Verify verifies that the current contents of the journal is expectedItems, returns nil if so or an error otherwise