pods

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatSortByPodID = 0 + iota
	StatSortByContainerName
	StatSortByCPUPerc
	StatSortByMemPerc
)

Stats sort options.

Variables

This section is empty.

Functions

func Create

func Create(opts CreateOptions) error

Create creates a new pod.

func Inspect

func Inspect(id string) (string, error)

Inspect inspects the specified pod.

func Kill

func Kill(id string) error

Kill sends SIGKILL signal to a pod's containers processeses.

func List

func List() ([]*entities.ListPodsReport, error)

List returns list of pods.

func Pause

func Pause(id string) error

Pause pauses a pod's containers.

func Prune

func Prune() ([]string, error)

Prune removes all stop pods.

func Remove

func Remove(id string) ([]string, error)

Remove removes the pod.

func Restart

func Restart(id string) error

Restart restarts a pod's containers.

func Start

func Start(id string) error

Start starts a pod's containers.

func Stop

func Stop(id string) error

Stop stops a pod's containers.

func Top

func Top(id string) ([][]string, error)

Top returns running processes on the pod.

func Unpause

func Unpause(id string) error

Unpause unpauses a pod's containers.

Types

type CreateOptions

type CreateOptions struct {
	Name            string
	NoHost          bool
	Labels          map[string]string
	DNSServer       []string
	DNSOptions      []string
	DNSSearchDomain []string
	Infra           bool
	InfraCommand    string
	InfraImage      string
	Hostname        string
	IPAddress       string
	MacAddress      string
	AddHost         []string
	Network         string
	Publish         []string
	SecurityOpts    []string
}

CreateOptions implements pods create spec options.

type StatReporter added in v0.2.0

type StatReporter struct {
	entities.PodStatsReport
}

StatReporter implements pod stats metrics.

func Stats added in v0.2.0

func Stats(opts *StatsOptions) ([]StatReporter, error)

Stats returns resource-usage statistics of a pod.

type StatsOptions added in v0.2.0

type StatsOptions struct {
	IDs    []string
	SortBy int
}

StatsOptions pod stats query option.

Jump to

Keyboard shortcuts

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