Documentation ¶
Index ¶
- type FactoryForMockContainerHandler
- type MockContainerHandler
- func (self *MockContainerHandler) Cleanup()
- func (self *MockContainerHandler) ContainerReference() (info.ContainerReference, error)
- func (self *MockContainerHandler) Exists() bool
- func (self *MockContainerHandler) GetCgroupPath(path string) (string, error)
- func (self *MockContainerHandler) GetContainerIPAddress() string
- func (self *MockContainerHandler) GetContainerLabels() map[string]string
- func (self *MockContainerHandler) GetSpec() (info.ContainerSpec, error)
- func (self *MockContainerHandler) GetStats() (*info.ContainerStats, error)
- func (self *MockContainerHandler) ListContainers(listType container.ListType) ([]info.ContainerReference, error)
- func (self *MockContainerHandler) ListProcesses(listType container.ListType) ([]int, error)
- func (self *MockContainerHandler) Start()
- func (self *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 (self *FactoryForMockContainerHandler) CanHandle(name string) bool
func (*FactoryForMockContainerHandler) NewContainerHandler ¶
func (self *FactoryForMockContainerHandler) NewContainerHandler(name string, inHostNamespace bool) (container.ContainerHandler, error)
func (*FactoryForMockContainerHandler) String ¶
func (self *FactoryForMockContainerHandler) String() string
type MockContainerHandler ¶
This struct mocks a container handler.
func NewMockContainerHandler ¶
func NewMockContainerHandler(containerName string) *MockContainerHandler
func (*MockContainerHandler) Cleanup ¶
func (self *MockContainerHandler) Cleanup()
func (*MockContainerHandler) ContainerReference ¶
func (self *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 (self *MockContainerHandler) Exists() bool
func (*MockContainerHandler) GetCgroupPath ¶
func (self *MockContainerHandler) GetCgroupPath(path string) (string, error)
func (*MockContainerHandler) GetContainerIPAddress ¶
func (self *MockContainerHandler) GetContainerIPAddress() string
func (*MockContainerHandler) GetContainerLabels ¶
func (self *MockContainerHandler) GetContainerLabels() map[string]string
func (*MockContainerHandler) GetSpec ¶
func (self *MockContainerHandler) GetSpec() (info.ContainerSpec, error)
func (*MockContainerHandler) GetStats ¶
func (self *MockContainerHandler) GetStats() (*info.ContainerStats, error)
func (*MockContainerHandler) ListContainers ¶
func (self *MockContainerHandler) ListContainers(listType container.ListType) ([]info.ContainerReference, error)
func (*MockContainerHandler) ListProcesses ¶
func (self *MockContainerHandler) ListProcesses(listType container.ListType) ([]int, error)
func (*MockContainerHandler) Start ¶
func (self *MockContainerHandler) Start()
func (*MockContainerHandler) Type ¶
func (self *MockContainerHandler) Type() container.ContainerType
Click to show internal directories.
Click to hide internal directories.