context

package
v20.10.7+incompatible Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContextCommand

func NewContextCommand(dockerCli command.Cli) *cobra.Command

NewContextCommand returns the context cli subcommand

func RunCreate

func RunCreate(cli command.Cli, o *CreateOptions) error

RunCreate creates a Docker context

func RunExport

func RunExport(dockerCli command.Cli, opts *ExportOptions) error

RunExport exports a Docker context

func RunImport

func RunImport(dockerCli command.Cli, name string, source string) error

RunImport imports a Docker context

func RunRemove

func RunRemove(dockerCli command.Cli, opts RemoveOptions, names []string) error

RunRemove removes one or more contexts

func RunUpdate

func RunUpdate(cli command.Cli, o *UpdateOptions) error

RunUpdate updates a Docker context

func RunUse

func RunUse(dockerCli command.Cli, name string) error

RunUse set the current Docker context

Types

type CreateOptions

type CreateOptions struct {
	Name                     string
	Description              string
	DefaultStackOrchestrator string
	Docker                   map[string]string
	Kubernetes               map[string]string
	From                     string
}

CreateOptions are the options used for creating a context

type ExportOptions

type ExportOptions struct {
	Kubeconfig  bool
	ContextName string
	Dest        string
}

ExportOptions are the options used for exporting a context

type RemoveOptions

type RemoveOptions struct {
	Force bool
}

RemoveOptions are the options used to remove contexts

type UpdateOptions

type UpdateOptions struct {
	Name                     string
	Description              string
	DefaultStackOrchestrator string
	Docker                   map[string]string
	Kubernetes               map[string]string
}

UpdateOptions are the options used to update a context

Jump to

Keyboard shortcuts

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