memory_management

package
v0.0.0-...-668a133 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetContainerOOMScoreAdjust

func GetContainerOOMScoreAdjust(container DockerContainer, memoryCapacity int64) int

func GetMemoryCapacity

func GetMemoryCapacity() (uint64, error)

func NewMemoryManagement

func NewMemoryManagement()

func ParseDockerTimestamp

func ParseDockerTimestamp(s string) (time.Time, error)

Types

type DockerClient

type DockerClient struct {
	// contains filtered or unexported fields
}

func NewDockerClient

func NewDockerClient(endpoint string, version string, requestTimeout time.Duration) (*DockerClient, error)

func NewDockerEnvClient

func NewDockerEnvClient(requestTimeout time.Duration) (*DockerClient, error)

func (*DockerClient) GetStats

func (c *DockerClient) GetStats(id string) (*dockertypes.StatsJSON, error)

func (*DockerClient) InspectContainer

func (c *DockerClient) InspectContainer(id string) (*dockertypes.ContainerJSON, error)

func (*DockerClient) ListContainers

func (c *DockerClient) ListContainers(options dockertypes.ContainerListOptions) ([]dockertypes.Container, error)

func (*DockerClient) TimeoutContext

func (c *DockerClient) TimeoutContext() (context.Context, context.CancelFunc)

type DockerContainer

type DockerContainer struct {
	Resource Resource
}

type DockerContainerManager

type DockerContainerManager struct {
	// contains filtered or unexported fields
}

type MemoryManagement

type MemoryManagement struct {
}

func (*MemoryManagement) SyncStats

func (m *MemoryManagement) SyncStats()

type Resource

type Resource struct {
	MemoryLimit   int64
	MemoryRequest int64
}

type Stats

type Stats struct {
	TotalCPUUsage    uint64
	Score            uint64
	CPUTimeInSeconds uint64
	CPUTimeInMinutes uint64
}

Jump to

Keyboard shortcuts

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