cadvisor: Index | Files

package testing

import ""


Package Files


type FactoryForMockContainerHandler Uses

type FactoryForMockContainerHandler struct {
    Name                        string
    PrepareContainerHandlerFunc func(name string, handler *MockContainerHandler)

func (*FactoryForMockContainerHandler) CanHandle Uses

func (h *FactoryForMockContainerHandler) CanHandle(name string) bool

func (*FactoryForMockContainerHandler) NewContainerHandler Uses

func (h *FactoryForMockContainerHandler) NewContainerHandler(name string, inHostNamespace bool) (container.ContainerHandler, error)

func (*FactoryForMockContainerHandler) String Uses

func (h *FactoryForMockContainerHandler) String() string

type MockContainerHandler Uses

type MockContainerHandler struct {
    Name    string
    Aliases []string

This struct mocks a container handler.

func NewMockContainerHandler Uses

func NewMockContainerHandler(containerName string) *MockContainerHandler

func (*MockContainerHandler) Cleanup Uses

func (h *MockContainerHandler) Cleanup()

func (*MockContainerHandler) ContainerReference Uses

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 Uses

func (h *MockContainerHandler) Exists() bool

func (*MockContainerHandler) GetCgroupPath Uses

func (h *MockContainerHandler) GetCgroupPath(path string) (string, error)

func (*MockContainerHandler) GetContainerIPAddress Uses

func (h *MockContainerHandler) GetContainerIPAddress() string

func (*MockContainerHandler) GetContainerLabels Uses

func (h *MockContainerHandler) GetContainerLabels() map[string]string

func (*MockContainerHandler) GetSpec Uses

func (h *MockContainerHandler) GetSpec() (info.ContainerSpec, error)

func (*MockContainerHandler) GetStats Uses

func (h *MockContainerHandler) GetStats() (*info.ContainerStats, error)

func (*MockContainerHandler) ListContainers Uses

func (h *MockContainerHandler) ListContainers(listType container.ListType) ([]info.ContainerReference, error)

func (*MockContainerHandler) ListProcesses Uses

func (h *MockContainerHandler) ListProcesses(listType container.ListType) ([]int, error)

func (*MockContainerHandler) Start Uses

func (h *MockContainerHandler) Start()

func (*MockContainerHandler) Type Uses

func (h *MockContainerHandler) Type() container.ContainerType

Package testing imports 3 packages (graph). Updated 2020-09-18. Refresh now. Tools for package owners.