pods

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: Apache-2.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(ctx context.Context, nameOrID string, options *ExistsOptions) (bool, error)

Exists is a lightweight method to determine if a pod exists in local storage

func Inspect

func Inspect(ctx context.Context, nameOrID string, options *InspectOptions) (*entities.PodInspectReport, error)

Inspect returns low-level information about the given pod.

func Kill

func Kill(ctx context.Context, nameOrID string, options *KillOptions) (*entities.PodKillReport, error)

Kill sends a SIGTERM to all the containers in a pod. The optional signal parameter can be used to override SIGTERM.

func List

func List(ctx context.Context, options *ListOptions) ([]*entities.ListPodsReport, error)

List returns all pods in local storage. The optional filters parameter can be used to refine which pods should be listed.

func Pause

func Pause(ctx context.Context, nameOrID string, options *PauseOptions) (*entities.PodPauseReport, error)

Pause pauses all running containers in a given pod.

func Prune

func Prune(ctx context.Context, options *PruneOptions) ([]*entities.PodPruneReport, error)

Prune by default removes all non-running pods in local storage. And with force set true removes all pods.

func Remove

func Remove(ctx context.Context, nameOrID string, options *RemoveOptions) (*entities.PodRmReport, error)

Remove deletes a Pod from from local storage. The optional force parameter denotes that the Pod can be removed even if in a running state.

func Restart

func Restart(ctx context.Context, nameOrID string, options *RestartOptions) (*entities.PodRestartReport, error)

Restart restarts all containers in a pod.

func Start

func Start(ctx context.Context, nameOrID string, options *StartOptions) (*entities.PodStartReport, error)

Start starts all containers in a pod.

func Stats

func Stats(ctx context.Context, namesOrIDs []string, options *StatsOptions) ([]*entities.PodStatsReport, error)

Stats display resource-usage statistics of one or more pods.

func Stop

func Stop(ctx context.Context, nameOrID string, options *StopOptions) (*entities.PodStopReport, error)

Stop stops all containers in a Pod. The optional timeout parameter can be used to override the timeout before the container is killed.

func Top

func Top(ctx context.Context, nameOrID string, options *TopOptions) ([]string, error)

Top gathers statistics about the running processes in a pod. The nameOrID can be a pod name or a partial/full ID. The descriptors allow for specifying which data to collect from each process.

func Unpause

func Unpause(ctx context.Context, nameOrID string, options *UnpauseOptions) (*entities.PodUnpauseReport, error)

Unpause unpauses all paused containers in a Pod.

Types

type CreateOptions

type CreateOptions struct {
}

CreateOptions are optional options for creating pods

func (*CreateOptions) Changed

func (o *CreateOptions) Changed(fieldName string) bool

Changed

func (*CreateOptions) ToParams

func (o *CreateOptions) ToParams() (url.Values, error)

ToParams

type ExistsOptions

type ExistsOptions struct {
}

ExistsOptions are optional options for checking if a pod exists

func (*ExistsOptions) Changed

func (o *ExistsOptions) Changed(fieldName string) bool

Changed

func (*ExistsOptions) ToParams

func (o *ExistsOptions) ToParams() (url.Values, error)

ToParams

type InspectOptions

type InspectOptions struct {
}

InspectOptions are optional options for inspecting pods

func (*InspectOptions) Changed

func (o *InspectOptions) Changed(fieldName string) bool

Changed

func (*InspectOptions) ToParams

func (o *InspectOptions) ToParams() (url.Values, error)

ToParams

type KillOptions

type KillOptions struct {
	Signal *string
}

KillOptions are optional options for killing pods

func (*KillOptions) Changed

func (o *KillOptions) Changed(fieldName string) bool

Changed

func (*KillOptions) GetSignal

func (o *KillOptions) GetSignal() string

GetSignal

func (*KillOptions) ToParams

func (o *KillOptions) ToParams() (url.Values, error)

ToParams

func (*KillOptions) WithSignal

func (o *KillOptions) WithSignal(value string) *KillOptions

WithSignal

type ListOptions

type ListOptions struct {
	Filters map[string][]string
}

ListOptions are optional options for listing pods

func (*ListOptions) Changed

func (o *ListOptions) Changed(fieldName string) bool

Changed

func (*ListOptions) GetFilters

func (o *ListOptions) GetFilters() map[string][]string

GetFilters

func (*ListOptions) ToParams

func (o *ListOptions) ToParams() (url.Values, error)

ToParams

func (*ListOptions) WithFilters

func (o *ListOptions) WithFilters(value map[string][]string) *ListOptions

WithFilters

type PauseOptions

type PauseOptions struct {
}

PauseOptions are optional options for pausing pods

func (*PauseOptions) Changed

func (o *PauseOptions) Changed(fieldName string) bool

Changed

func (*PauseOptions) ToParams

func (o *PauseOptions) ToParams() (url.Values, error)

ToParams

type PruneOptions

type PruneOptions struct {
}

PruneOptions are optional options for pruning pods

func (*PruneOptions) Changed

func (o *PruneOptions) Changed(fieldName string) bool

Changed

func (*PruneOptions) ToParams

func (o *PruneOptions) ToParams() (url.Values, error)

ToParams

type RemoveOptions

type RemoveOptions struct {
	Force *bool
}

RemoveOptions are optional options for removing pods

func (*RemoveOptions) Changed

func (o *RemoveOptions) Changed(fieldName string) bool

Changed

func (*RemoveOptions) GetForce

func (o *RemoveOptions) GetForce() bool

GetForce

func (*RemoveOptions) ToParams

func (o *RemoveOptions) ToParams() (url.Values, error)

ToParams

func (*RemoveOptions) WithForce

func (o *RemoveOptions) WithForce(value bool) *RemoveOptions

WithForce

type RestartOptions

type RestartOptions struct {
}

RestartOptions are optional options for restarting pods

func (*RestartOptions) Changed

func (o *RestartOptions) Changed(fieldName string) bool

Changed

func (*RestartOptions) ToParams

func (o *RestartOptions) ToParams() (url.Values, error)

ToParams

type StartOptions

type StartOptions struct {
}

StartOptions are optional options for starting pods

func (*StartOptions) Changed

func (o *StartOptions) Changed(fieldName string) bool

Changed

func (*StartOptions) ToParams

func (o *StartOptions) ToParams() (url.Values, error)

ToParams

type StatsOptions

type StatsOptions struct {
	All *bool
}

StatsOptions are optional options for getting stats of pods

func (*StatsOptions) Changed

func (o *StatsOptions) Changed(fieldName string) bool

Changed

func (*StatsOptions) GetAll

func (o *StatsOptions) GetAll() bool

GetAll

func (*StatsOptions) ToParams

func (o *StatsOptions) ToParams() (url.Values, error)

ToParams

func (*StatsOptions) WithAll

func (o *StatsOptions) WithAll(value bool) *StatsOptions

WithAll

type StopOptions

type StopOptions struct {
	Timeout *int
}

StopOptions are optional options for stopping pods

func (*StopOptions) Changed

func (o *StopOptions) Changed(fieldName string) bool

Changed

func (*StopOptions) GetTimeout

func (o *StopOptions) GetTimeout() int

GetTimeout

func (*StopOptions) ToParams

func (o *StopOptions) ToParams() (url.Values, error)

ToParams

func (*StopOptions) WithTimeout

func (o *StopOptions) WithTimeout(value int) *StopOptions

WithTimeout

type TopOptions

type TopOptions struct {
	Descriptors []string
}

TopOptions are optional options for getting top on pods

func (*TopOptions) Changed

func (o *TopOptions) Changed(fieldName string) bool

Changed

func (*TopOptions) GetDescriptors

func (o *TopOptions) GetDescriptors() []string

GetDescriptors

func (*TopOptions) ToParams

func (o *TopOptions) ToParams() (url.Values, error)

ToParams

func (*TopOptions) WithDescriptors

func (o *TopOptions) WithDescriptors(value []string) *TopOptions

WithDescriptors

type UnpauseOptions

type UnpauseOptions struct {
}

UnpauseOptions are optional options for unpausinging pods

func (*UnpauseOptions) Changed

func (o *UnpauseOptions) Changed(fieldName string) bool

Changed

func (*UnpauseOptions) ToParams

func (o *UnpauseOptions) ToParams() (url.Values, error)

ToParams

Jump to

Keyboard shortcuts

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