Documentation ¶
Index ¶
- type FactoryForMockContainerHandler
- type MockContainerHandler
- func (h *MockContainerHandler) Cleanup()
- func (h *MockContainerHandler) ContainerReference() (info.ContainerReference, error)
- func (h *MockContainerHandler) Exists() bool
- func (h *MockContainerHandler) GetCgroupPath(path string) (string, error)
- func (h *MockContainerHandler) GetContainerIPAddress() string
- func (h *MockContainerHandler) GetContainerLabels() map[string]string
- func (h *MockContainerHandler) GetSpec() (info.ContainerSpec, error)
- func (h *MockContainerHandler) GetStats() (*info.ContainerStats, error)
- func (h *MockContainerHandler) ListContainers(listType container.ListType) ([]info.ContainerReference, error)
- func (h *MockContainerHandler) ListProcesses(listType container.ListType) ([]int, error)
- func (h *MockContainerHandler) Start()
- func (h *MockContainerHandler) Type() container.ContainerType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FactoryForMockContainerHandler ¶
type FactoryForMockContainerHandler struct { Name string PrepareContainerHandlerFunc func(name string, handler *MockContainerHandler) }
func (*FactoryForMockContainerHandler) CanHandle ¶
func (h *FactoryForMockContainerHandler) CanHandle(name string) bool
func (*FactoryForMockContainerHandler) NewContainerHandler ¶
func (h *FactoryForMockContainerHandler) NewContainerHandler(name string, inHostNamespace bool) (container.ContainerHandler, error)
func (*FactoryForMockContainerHandler) String ¶
func (h *FactoryForMockContainerHandler) String() string
type MockContainerHandler ¶
This struct mocks a container handler.
func NewMockContainerHandler ¶
func NewMockContainerHandler(containerName string) *MockContainerHandler
func (*MockContainerHandler) Cleanup ¶
func (h *MockContainerHandler) Cleanup()
func (*MockContainerHandler) ContainerReference ¶
func (h *MockContainerHandler) ContainerReference() (info.ContainerReference, error)
If self.Name is not empty, then ContainerReference() will return self.Name and self.Aliases. Otherwise, it will use the value provided by .On().Return().
func (*MockContainerHandler) Exists ¶
func (h *MockContainerHandler) Exists() bool
func (*MockContainerHandler) GetCgroupPath ¶
func (h *MockContainerHandler) GetCgroupPath(path string) (string, error)
func (*MockContainerHandler) GetContainerIPAddress ¶
func (h *MockContainerHandler) GetContainerIPAddress() string
func (*MockContainerHandler) GetContainerLabels ¶
func (h *MockContainerHandler) GetContainerLabels() map[string]string
func (*MockContainerHandler) GetSpec ¶
func (h *MockContainerHandler) GetSpec() (info.ContainerSpec, error)
func (*MockContainerHandler) GetStats ¶
func (h *MockContainerHandler) GetStats() (*info.ContainerStats, error)
func (*MockContainerHandler) ListContainers ¶
func (h *MockContainerHandler) ListContainers(listType container.ListType) ([]info.ContainerReference, error)
func (*MockContainerHandler) ListProcesses ¶
func (h *MockContainerHandler) ListProcesses(listType container.ListType) ([]int, error)
func (*MockContainerHandler) Start ¶
func (h *MockContainerHandler) Start()
func (*MockContainerHandler) Type ¶
func (h *MockContainerHandler) Type() container.ContainerType
Click to show internal directories.
Click to hide internal directories.