Documentation ¶
Index ¶
- Variables
- func BuildContainerName(metadata *runtimeApi.ContainerMetadata, sandboxID string) string
- func BuildSandboxName(metadata *runtimeApi.PodSandboxMetadata) string
- type FakeContainer
- type FakeImageService
- func (r *FakeImageService) ImageStatus(image *runtimeApi.ImageSpec) (*runtimeApi.Image, error)
- func (r *FakeImageService) ListImages(filter *runtimeApi.ImageFilter) ([]*runtimeApi.Image, error)
- func (r *FakeImageService) PullImage(image *runtimeApi.ImageSpec, auth *runtimeApi.AuthConfig) error
- func (r *FakeImageService) RemoveImage(image *runtimeApi.ImageSpec) error
- func (r *FakeImageService) SetFakeImageSize(size uint64)
- func (r *FakeImageService) SetFakeImages(images []string)
- type FakePodSandbox
- type FakeRuntimeService
- func (r *FakeRuntimeService) AssertCalls(calls []string) error
- func (r *FakeRuntimeService) Attach(req *runtimeApi.AttachRequest) (*runtimeApi.AttachResponse, error)
- func (r *FakeRuntimeService) ContainerStatus(containerID string) (*runtimeApi.ContainerStatus, error)
- func (r *FakeRuntimeService) CreateContainer(podSandboxID string, config *runtimeApi.ContainerConfig, ...) (string, error)
- func (r *FakeRuntimeService) Exec(*runtimeApi.ExecRequest) (*runtimeApi.ExecResponse, error)
- func (r *FakeRuntimeService) ExecSync(containerID string, cmd []string, timeout time.Duration) (stdout []byte, stderr []byte, err error)
- func (r *FakeRuntimeService) ListContainers(filter *runtimeApi.ContainerFilter) ([]*runtimeApi.Container, error)
- func (r *FakeRuntimeService) ListPodSandbox(filter *runtimeApi.PodSandboxFilter) ([]*runtimeApi.PodSandbox, error)
- func (r *FakeRuntimeService) PodSandboxStatus(podSandboxID string) (*runtimeApi.PodSandboxStatus, error)
- func (r *FakeRuntimeService) PortForward(*runtimeApi.PortForwardRequest) (*runtimeApi.PortForwardResponse, error)
- func (r *FakeRuntimeService) RemoveContainer(containerID string) error
- func (r *FakeRuntimeService) RemovePodSandbox(podSandboxID string) error
- func (r *FakeRuntimeService) RunPodSandbox(config *runtimeApi.PodSandboxConfig) (string, error)
- func (r *FakeRuntimeService) SetFakeContainers(containers []*FakeContainer)
- func (r *FakeRuntimeService) SetFakeSandboxes(sandboxes []*FakePodSandbox)
- func (r *FakeRuntimeService) StartContainer(containerID string) error
- func (r *FakeRuntimeService) Status() (*runtimeApi.RuntimeStatus, error)
- func (r *FakeRuntimeService) StopContainer(containerID string, timeout int64) error
- func (r *FakeRuntimeService) StopPodSandbox(podSandboxID string) error
- func (r *FakeRuntimeService) UpdateRuntimeConfig(runtimeCOnfig *runtimeApi.RuntimeConfig) error
- func (r *FakeRuntimeService) Version(apiVersion string) (*runtimeApi.VersionResponse, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( FakeRuntimeName = "fakeRuntime" FakePodSandboxIP = "192.168.192.168" )
Functions ¶
func BuildContainerName ¶
func BuildContainerName(metadata *runtimeApi.ContainerMetadata, sandboxID string) string
func BuildSandboxName ¶
func BuildSandboxName(metadata *runtimeApi.PodSandboxMetadata) string
Types ¶
type FakeContainer ¶
type FakeContainer struct { // ContainerStatus contains the runtime information for a container. runtimeApi.ContainerStatus // the sandbox id of this container SandboxID string }
type FakeImageService ¶
type FakeImageService struct { sync.Mutex FakeImageSize uint64 Called []string Images map[string]*runtimeApi.Image }
func NewFakeImageService ¶
func NewFakeImageService() *FakeImageService
func (*FakeImageService) ImageStatus ¶
func (r *FakeImageService) ImageStatus(image *runtimeApi.ImageSpec) (*runtimeApi.Image, error)
func (*FakeImageService) ListImages ¶
func (r *FakeImageService) ListImages(filter *runtimeApi.ImageFilter) ([]*runtimeApi.Image, error)
func (*FakeImageService) PullImage ¶
func (r *FakeImageService) PullImage(image *runtimeApi.ImageSpec, auth *runtimeApi.AuthConfig) error
func (*FakeImageService) RemoveImage ¶
func (r *FakeImageService) RemoveImage(image *runtimeApi.ImageSpec) error
func (*FakeImageService) SetFakeImageSize ¶
func (r *FakeImageService) SetFakeImageSize(size uint64)
func (*FakeImageService) SetFakeImages ¶
func (r *FakeImageService) SetFakeImages(images []string)
type FakePodSandbox ¶
type FakePodSandbox struct { // PodSandboxStatus contains the runtime information for a sandbox. runtimeApi.PodSandboxStatus }
type FakeRuntimeService ¶
type FakeRuntimeService struct { sync.Mutex Called []string FakeStatus *runtimeApi.RuntimeStatus Containers map[string]*FakeContainer Sandboxes map[string]*FakePodSandbox }
func NewFakeRuntimeService ¶
func NewFakeRuntimeService() *FakeRuntimeService
func (*FakeRuntimeService) AssertCalls ¶
func (r *FakeRuntimeService) AssertCalls(calls []string) error
func (*FakeRuntimeService) Attach ¶
func (r *FakeRuntimeService) Attach(req *runtimeApi.AttachRequest) (*runtimeApi.AttachResponse, error)
func (*FakeRuntimeService) ContainerStatus ¶
func (r *FakeRuntimeService) ContainerStatus(containerID string) (*runtimeApi.ContainerStatus, error)
func (*FakeRuntimeService) CreateContainer ¶
func (r *FakeRuntimeService) CreateContainer(podSandboxID string, config *runtimeApi.ContainerConfig, sandboxConfig *runtimeApi.PodSandboxConfig) (string, error)
func (*FakeRuntimeService) Exec ¶
func (r *FakeRuntimeService) Exec(*runtimeApi.ExecRequest) (*runtimeApi.ExecResponse, error)
func (*FakeRuntimeService) ListContainers ¶
func (r *FakeRuntimeService) ListContainers(filter *runtimeApi.ContainerFilter) ([]*runtimeApi.Container, error)
func (*FakeRuntimeService) ListPodSandbox ¶
func (r *FakeRuntimeService) ListPodSandbox(filter *runtimeApi.PodSandboxFilter) ([]*runtimeApi.PodSandbox, error)
func (*FakeRuntimeService) PodSandboxStatus ¶
func (r *FakeRuntimeService) PodSandboxStatus(podSandboxID string) (*runtimeApi.PodSandboxStatus, error)
func (*FakeRuntimeService) PortForward ¶
func (r *FakeRuntimeService) PortForward(*runtimeApi.PortForwardRequest) (*runtimeApi.PortForwardResponse, error)
func (*FakeRuntimeService) RemoveContainer ¶
func (r *FakeRuntimeService) RemoveContainer(containerID string) error
func (*FakeRuntimeService) RemovePodSandbox ¶
func (r *FakeRuntimeService) RemovePodSandbox(podSandboxID string) error
func (*FakeRuntimeService) RunPodSandbox ¶
func (r *FakeRuntimeService) RunPodSandbox(config *runtimeApi.PodSandboxConfig) (string, error)
func (*FakeRuntimeService) SetFakeContainers ¶
func (r *FakeRuntimeService) SetFakeContainers(containers []*FakeContainer)
func (*FakeRuntimeService) SetFakeSandboxes ¶
func (r *FakeRuntimeService) SetFakeSandboxes(sandboxes []*FakePodSandbox)
func (*FakeRuntimeService) StartContainer ¶
func (r *FakeRuntimeService) StartContainer(containerID string) error
func (*FakeRuntimeService) Status ¶
func (r *FakeRuntimeService) Status() (*runtimeApi.RuntimeStatus, error)
func (*FakeRuntimeService) StopContainer ¶
func (r *FakeRuntimeService) StopContainer(containerID string, timeout int64) error
func (*FakeRuntimeService) StopPodSandbox ¶
func (r *FakeRuntimeService) StopPodSandbox(podSandboxID string) error
func (*FakeRuntimeService) UpdateRuntimeConfig ¶
func (r *FakeRuntimeService) UpdateRuntimeConfig(runtimeCOnfig *runtimeApi.RuntimeConfig) error
func (*FakeRuntimeService) Version ¶
func (r *FakeRuntimeService) Version(apiVersion string) (*runtimeApi.VersionResponse, error)
Click to show internal directories.
Click to hide internal directories.