shared

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2018 License: Apache-2.0 Imports: 13 Imported by: 4 modules, 7 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCtrInspectInfo

func GetCtrInspectInfo(ctr *libpod.Container, ctrInspectData *inspect.ContainerInspectData) (*inspect.ContainerData, error)

GetCtrInspectInfo takes container inspect data and collects all its info into a ContainerData structure for inspection related methods

func GetNamespaceOptions added in v0.8.4

func GetNamespaceOptions(ns []string) ([]libpod.PodCreateOption, error)

GetNamespaceOptions transforms a slice of kernel namespaces into a slice of pod create options. Currently, not all kernel namespaces are supported, and they will be returned in an error

func GetPodStatus

func GetPodStatus(pod *libpod.Pod) (string, error)

GetPodStatus determines the status of the pod based on the statuses of the containers in the pod. Returns a string representation of the pod status

Types

type BatchContainerStruct

type BatchContainerStruct struct {
	ConConfig   *libpod.ContainerConfig
	ConState    libpod.ContainerStatus
	ExitCode    int32
	Exited      bool
	Pid         int
	StartedTime time.Time
	ExitedTime  time.Time
	Size        *ContainerSize
}

BatchContainerStruct is the return obkect from BatchContainer and contains container related information

func BatchContainerOp

func BatchContainerOp(ctr *libpod.Container, opts PsOptions) (BatchContainerStruct, error)

BatchContainer is used in ps to reduce performance hits by "batching" locks.

type ContainerSize

type ContainerSize struct {
	RootFsSize int64 `json:"rootFsSize"`
	RwSize     int64 `json:"rwSize"`
}

ContainerSize holds the size of the container's root filesystem and top read-write layer

type Namespace

type Namespace struct {
	PID    string `json:"pid,omitempty"`
	Cgroup string `json:"cgroup,omitempty"`
	IPC    string `json:"ipc,omitempty"`
	MNT    string `json:"mnt,omitempty"`
	NET    string `json:"net,omitempty"`
	PIDNS  string `json:"pidns,omitempty"`
	User   string `json:"user,omitempty"`
	UTS    string `json:"uts,omitempty"`
}

Namespace describes output for ps namespace

func GetNamespaces

func GetNamespaces(pid int) *Namespace

GetNamespaces returns a populated namespace struct

type PsOptions

type PsOptions struct {
	All       bool
	Format    string
	Last      int
	Latest    bool
	NoTrunc   bool
	Pod       bool
	Quiet     bool
	Size      bool
	Sort      string
	Label     string
	Namespace bool
}

PsOptions describes the struct being formed for ps

Jump to

Keyboard shortcuts

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