container

package
v0.0.0-...-410f0c4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlreadyExistsError

type AlreadyExistsError struct {
	Id string
}

func (*AlreadyExistsError) Error

func (e *AlreadyExistsError) Error() string

type CouldNotCreateProcessError

type CouldNotCreateProcessError struct {
	Id      string
	Command string
}

func (*CouldNotCreateProcessError) Error

type HCSClient

type HCSClient interface {
	GetContainers(hcsshim.ComputeSystemQuery) ([]hcsshim.ContainerProperties, error)
	GetContainerProperties(string) (hcsshim.ContainerProperties, error)
	NameToGuid(string) (hcsshim.GUID, error)
	CreateContainer(string, *hcsshim.ContainerConfig) (hcs.Container, error)
	OpenContainer(string) (hcs.Container, error)
	IsPending(error) bool
	GetHNSEndpointByName(string) (*hcsshim.HNSEndpoint, error)
}

type InvalidIdError

type InvalidIdError struct {
	Id string
}

func (*InvalidIdError) Error

func (e *InvalidIdError) Error() string

type InvalidMountOptionsError

type InvalidMountOptionsError struct {
	Id      string
	Options []string
}

func (*InvalidMountOptionsError) Error

func (e *InvalidMountOptionsError) Error() string

type Manager

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

func New

func New(logger *logrus.Entry, hcsClient HCSClient, id string) *Manager

func (*Manager) Create

func (m *Manager) Create(spec *specs.Spec, credentialSpec string) error

func (*Manager) CredentialSpec

func (m *Manager) CredentialSpec(credentialSpecPath string) (string, error)

func (*Manager) Delete

func (m *Manager) Delete(force bool) error

func (*Manager) Exec

func (m *Manager) Exec(processSpec *specs.Process, createIOPipes bool) (hcs.Process, error)

func (*Manager) Spec

func (m *Manager) Spec(bundlePath string) (*specs.Spec, error)

func (*Manager) Stats

func (m *Manager) Stats() (Statistics, error)

type MissingVolumePathError

type MissingVolumePathError struct {
	Id string
}

func (*MissingVolumePathError) Error

func (e *MissingVolumePathError) Error() string

type Statistics

type Statistics struct {
	Data struct {
		CPUStats struct {
			CPUUsage struct {
				Usage  uint64 `json:"total"`
				System uint64 `json:"kernel"`
				User   uint64 `json:"user"`
			} `json:"usage"`
		} `json:"cpu"`
		Memory struct {
			Raw struct {
				TotalRss uint64 `json:"total_rss,omitempty"`
			} `json:"raw,omitempty"`
		} `json:"memory,omitempty"`
		Pids struct {
			Current uint64 `json:"current,omitempty"`
			Limit   uint64 `json:"limit,omitempty"`
		} `json:"pids"`
	} `json:"data,omitempty"`
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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