mocks

package
v0.0.0-...-e2eb8ad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MockGetters map[string]container.StatGetter = map[string]container.StatGetter{
	"cpu_usage":  &MockCpuAcct{},
	"cache":      &MockMemCache{},
	"usage":      &MockMemUsage{},
	"statistics": &MockMemStats{},
	"network":    &MockNet{},
	"tcp":        &MockTcp{},
	"tcp6":       &MockTcp{},
}

Functions

This section is empty.

Types

type ClientMock

type ClientMock struct {
	mock.Mock
}

func (*ClientMock) FindCgroupMountpoint

func (cm *ClientMock) FindCgroupMountpoint(procfs string, subsystem string) (string, error)

func (*ClientMock) FindControllerMountpoint

func (cm *ClientMock) FindControllerMountpoint(cgroupPath, pid, procfs string) (string, error)

func (*ClientMock) GetDockerParams

func (cm *ClientMock) GetDockerParams(params ...string) (map[string]string, error)

func (*ClientMock) InspectContainer

func (cm *ClientMock) InspectContainer(string) (*docker.Container, error)

func (*ClientMock) ListContainersAsMap

func (cm *ClientMock) ListContainersAsMap() (map[string]*container.ContainerData, error)

func (*ClientMock) NewDockerClient

func (cm *ClientMock) NewDockerClient() (*container.DockerClient, error)

type MockCpuAcct

type MockCpuAcct struct{}

func (*MockCpuAcct) GetStats

func (m *MockCpuAcct) GetStats(stats *container.Statistics, opts container.GetStatOpt) error

type MockMemCache

type MockMemCache struct{}

func (*MockMemCache) GetStats

func (m *MockMemCache) GetStats(stats *container.Statistics, opts container.GetStatOpt) error

type MockMemStats

type MockMemStats struct{}

func (*MockMemStats) GetStats

func (m *MockMemStats) GetStats(stats *container.Statistics, opts container.GetStatOpt) error

type MockMemUsage

type MockMemUsage struct{}

func (*MockMemUsage) GetStats

func (m *MockMemUsage) GetStats(stats *container.Statistics, opts container.GetStatOpt) error

type MockNet

type MockNet struct{}

func (*MockNet) GetStats

func (m *MockNet) GetStats(stats *container.Statistics, opts container.GetStatOpt) error

type MockTcp

type MockTcp struct{}

func (*MockTcp) GetStats

func (m *MockTcp) GetStats(stats *container.Statistics, opts container.GetStatOpt) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL