Documentation ¶
Index ¶
- func CreatePodFromSpec(ctx context.Context, s *specgen.PodSpecGenerator, options *CreateOptions) (*entities.PodCreateReport, error)
- func Exists(ctx context.Context, nameOrID string, options *ExistsOptions) (bool, error)
- func Inspect(ctx context.Context, nameOrID string, options *InspectOptions) (*entities.PodInspectReport, error)
- func Kill(ctx context.Context, nameOrID string, options *KillOptions) (*entities.PodKillReport, error)
- func List(ctx context.Context, options *ListOptions) ([]*entities.ListPodsReport, error)
- func Pause(ctx context.Context, nameOrID string, options *PauseOptions) (*entities.PodPauseReport, error)
- func Prune(ctx context.Context, options *PruneOptions) ([]*entities.PodPruneReport, error)
- func Remove(ctx context.Context, nameOrID string, options *RemoveOptions) (*entities.PodRmReport, error)
- func Restart(ctx context.Context, nameOrID string, options *RestartOptions) (*entities.PodRestartReport, error)
- func Start(ctx context.Context, nameOrID string, options *StartOptions) (*entities.PodStartReport, error)
- func Stats(ctx context.Context, namesOrIDs []string, options *StatsOptions) ([]*entities.PodStatsReport, error)
- func Stop(ctx context.Context, nameOrID string, options *StopOptions) (*entities.PodStopReport, error)
- func Top(ctx context.Context, nameOrID string, options *TopOptions) ([]string, error)
- func Unpause(ctx context.Context, nameOrID string, options *UnpauseOptions) (*entities.PodUnpauseReport, error)
- type CreateOptions
- type ExistsOptions
- type InspectOptions
- type KillOptions
- type ListOptions
- type PauseOptions
- type PruneOptions
- type RemoveOptions
- type RestartOptions
- type StartOptions
- type StatsOptions
- type StopOptions
- type TopOptions
- type UnpauseOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePodFromSpec ¶
func CreatePodFromSpec(ctx context.Context, s *specgen.PodSpecGenerator, options *CreateOptions) (*entities.PodCreateReport, error)
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 ¶
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
type ExistsOptions ¶
type ExistsOptions struct { }
ExistsOptions are optional options for checking if a pod exists
type InspectOptions ¶
type InspectOptions struct { }
InspectOptions are optional options for inspecting pods
type KillOptions ¶
type KillOptions struct {
Signal *string
}
KillOptions are optional options for killing pods
func (*KillOptions) WithSignal ¶
func (o *KillOptions) WithSignal(value string) *KillOptions
WithSignal
type ListOptions ¶
ListOptions are optional options for listing pods
func (*ListOptions) WithFilters ¶
func (o *ListOptions) WithFilters(value map[string][]string) *ListOptions
WithFilters
type RemoveOptions ¶
type RemoveOptions struct {
Force *bool
}
RemoveOptions are optional options for removing pods
func (*RemoveOptions) WithForce ¶
func (o *RemoveOptions) WithForce(value bool) *RemoveOptions
WithForce
type RestartOptions ¶
type RestartOptions struct { }
RestartOptions are optional options for restarting pods
type StartOptions ¶
type StartOptions struct { }
StartOptions are optional options for starting pods
type StatsOptions ¶
type StatsOptions struct {
All *bool
}
StatsOptions are optional options for getting stats of pods
type StopOptions ¶
type StopOptions struct {
Timeout *int
}
StopOptions are optional options for stopping pods
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) WithDescriptors ¶
func (o *TopOptions) WithDescriptors(value []string) *TopOptions
WithDescriptors
type UnpauseOptions ¶
type UnpauseOptions struct { }
UnpauseOptions are optional options for unpausinging pods
Source Files ¶
- pods.go
- types.go
- types_create_options.go
- types_exists_options.go
- types_inspect_options.go
- types_kill_options.go
- types_list_options.go
- types_pause_options.go
- types_prune_options.go
- types_remove_options.go
- types_restart_options.go
- types_start_options.go
- types_stats_options.go
- types_stop_options.go
- types_top_options.go
- types_unpause_options.go