cli

package
v0.4.0-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2017 License: Apache-2.0 Imports: 54 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// PossibleResourceTypes help description
	PossibleResourceTypes = `` /* 198-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func CreateDeploy

func CreateDeploy(comm *koliutil.CommandParams, args []string) error

CreateDeploy implements the behavior to run the create deploy command

func CreateNamespace

func CreateNamespace(f *koliutil.Factory, cmdOut io.Writer, cmd *cobra.Command, args []string) error

CreateNamespace adds a new namespace in the controller API

func DeleteResult

func DeleteResult(r *resource.Result, out io.Writer, ignoreNotFound bool, shortOutput bool, mapper meta.RESTMapper) error

DeleteResult .

func DescribeMatchingResources

func DescribeMatchingResources(mapper meta.RESTMapper, typer runtime.ObjectTyper, f cmdutil.Factory, namespace, rsrc, prefix string, describerSettings *kubectl.DescriberSettings, out io.Writer, originalError error) error

DescribeMatchingResources .

func NewCmdAttach

func NewCmdAttach(comm *koliutil.CommandParams) *cobra.Command

NewCmdAttach .

func NewCmdCreate

func NewCmdCreate(comm *koliutil.CommandParams) *cobra.Command

NewCmdCreate .

func NewCmdCreateAddOn

func NewCmdCreateAddOn(comm *koliutil.CommandParams) *cobra.Command

NewCmdCreateAddOn create pre-defined applications in the form of deployments

func NewCmdCreateDeploy

func NewCmdCreateDeploy(comm *koliutil.CommandParams) *cobra.Command

NewCmdCreateDeploy is a macro command to create a new deployment

func NewCmdCreateLinks(comm *koliutil.CommandParams) *cobra.Command

NewCmdCreateLinks creates a command object for allowing traffic between namespaces

func NewCmdCreateNamespace

func NewCmdCreateNamespace(f *koliutil.Factory, cmdOut io.Writer) *cobra.Command

NewCmdCreateNamespace is a macro command to create a new namespace

func NewCmdDelete

func NewCmdDelete(comm *koliutil.CommandParams) *cobra.Command

NewCmdDelete .

func NewCmdDescribe

func NewCmdDescribe(comm *koliutil.CommandParams) *cobra.Command

NewCmdDescribe .

func NewCmdExec

func NewCmdExec(comm *koliutil.CommandParams) *cobra.Command

NewCmdExec .

func NewCmdGet

func NewCmdGet(comm *koliutil.CommandParams) *cobra.Command

NewCmdGet creates a command object for the generic "get" action, which retrieves one or more resources from a server.

func NewCmdLabel

func NewCmdLabel(f *koliutil.Factory, out io.Writer) *cobra.Command

NewCmdLabel .

func NewCmdLogin

func NewCmdLogin(comm *koliutil.CommandParams, pathOptions *clientcmd.PathOptions) *cobra.Command

NewCmdLogin .

func NewCmdLogs

func NewCmdLogs(comm *koliutil.CommandParams) *cobra.Command

NewCmdLogs creates a new pod logs command

func NewCmdPortForward

func NewCmdPortForward(comm *koliutil.CommandParams) *cobra.Command

NewCmdPortForward .

func NewCmdScale

func NewCmdScale(comm *koliutil.CommandParams) *cobra.Command

NewCmdScale returns a cobra command with the appropriate configuration and flags to run scale

func NewCmdVersion

func NewCmdVersion(f cmdutil.Factory, out io.Writer) *cobra.Command

NewCmdVersion command for printing the version of client and server

func NewKubectlCommand

func NewKubectlCommand(f *koliutil.Factory, in io.Reader, out, err io.Writer) *cobra.Command

NewKubectlCommand creates the `kubectl` command and its nested children.

func ReapResult

func ReapResult(r *resource.Result,
	f cmdutil.Factory,
	out io.Writer, isDefaultDelete, ignoreNotFound bool,
	timeout time.Duration, gracePeriod int,
	shortOutput bool,
	mapper meta.RESTMapper, quiet bool) error

ReapResult .

func RunDelete

func RunDelete(comm *koliutil.CommandParams, args []string, options *DeleteOptions) error

RunDelete .

func RunDescribe

func RunDescribe(comm *koliutil.CommandParams, args []string, options *DescribeOptions, ds *kubectl.DescriberSettings) error

RunDescribe .

func RunGet

func RunGet(comm *koliutil.CommandParams, args []string, options *GetOptions) error

RunGet implements the generic Get command

func RunLabel

func RunLabel(f cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, options *kubecmd.LabelOptions) error

RunLabel .

func RunScale

func RunScale(comm *koliutil.CommandParams, args []string, shortOutput bool, options *ScaleOptions) error

RunScale executes the scaling

func ValidateParams

func ValidateParams(paramSpec []kubectl.GeneratorParam, params map[string]interface{}) error

ValidateParams ensures that all required params are present in the params map

Types

type AttachOptions

type AttachOptions struct {
	StreamOptions

	CommandName string

	Pod *api.Pod

	Attach    RemoteAttach
	PodClient coreclient.PodsGetter
	Config    *restclient.Config
}

AttachOptions declare the arguments accepted by the Exec command

func (*AttachOptions) Complete

func (p *AttachOptions) Complete(comm *koliutil.CommandParams, argsIn []string) error

Complete verifies command line arguments and loads data from the command environment

func (*AttachOptions) GetContainerName

func (p *AttachOptions) GetContainerName(pod *api.Pod) (string, error)

GetContainerName returns the name of the container to attach to, with a fallback.

func (*AttachOptions) Run

func (p *AttachOptions) Run() error

Run executes a validated remote execution against a pod.

func (*AttachOptions) Validate

func (p *AttachOptions) Validate() error

Validate checks that the provided attach options are specified.

type DefaultRemoteAttach

type DefaultRemoteAttach struct{}

DefaultRemoteAttach is the standard implementation of attaching

func (*DefaultRemoteAttach) Attach

func (*DefaultRemoteAttach) Attach(method string, url *url.URL, config *restclient.Config, stdin io.Reader, stdout, stderr io.Writer, tty bool, terminalSizeQueue term.TerminalSizeQueue) error

Attach .

type DefaultRemoteExecutor

type DefaultRemoteExecutor struct{}

DefaultRemoteExecutor is the standard implementation of remote command execution

func (*DefaultRemoteExecutor) Execute

func (*DefaultRemoteExecutor) Execute(method string, url *url.URL, config *restclient.Config, stdin io.Reader, stdout, stderr io.Writer, tty bool, terminalSizeQueue term.TerminalSizeQueue) error

Execute .

type DeleteOptions

type DeleteOptions struct {
	Filenames         []string
	Recursive         bool
	IsNamespaced      bool
	IsResourceSlashed bool
}

DeleteOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()

type DeploymentBasicGeneratorV1

type DeploymentBasicGeneratorV1 struct {
	Name             string
	Paused           bool
	ComputeResources api.ResourceList

	Repository string
	Release    string
}

DeploymentBasicGeneratorV1 supports stable generation of a deployment

func (DeploymentBasicGeneratorV1) ParamNames

ParamNames .

func (*DeploymentBasicGeneratorV1) StructuredGenerate

func (s *DeploymentBasicGeneratorV1) StructuredGenerate() (runtime.Object, error)

StructuredGenerate outputs a deployment object using the configured fields

type DescribeOptions

type DescribeOptions struct {
	Filenames         []string
	Recursive         bool
	IsNamespaced      bool
	IsResourceSlashed bool
}

DescribeOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()

type ExecOptions

type ExecOptions struct {
	StreamOptions

	Command []string

	Executor  RemoteExecutor
	PodClient coreclient.PodsGetter
	Config    *restclient.Config
}

ExecOptions declare the arguments accepted by the Exec command

func (*ExecOptions) Complete

func (p *ExecOptions) Complete(comm *koliutil.CommandParams, argsIn []string, argsLenAtDash int) error

Complete verifies command line arguments and loads data from the command environment

func (*ExecOptions) Run

func (p *ExecOptions) Run() error

Run executes a validated remote execution against a pod.

func (*ExecOptions) Validate

func (p *ExecOptions) Validate() error

Validate checks that the provided exec options are specified.

type GetOptions

type GetOptions struct {
	Filenames            []string
	Recursive            bool
	IsNamespaced         bool
	IsSingleResourceType bool
	IsResourceSlashed    bool

	Raw string
}

GetOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()

type Link struct {
	Name          string `json:"name"`
	ServiceDNS    string `json:"service_dns"`
	NetworkPolicy string `json:"networkpolicy"`
	Port          int    `json:"port"`
	Service       string `json:"service"`
	Status        string `json:"status"`
}

Link represents a controller resource

type LogsOptions

type LogsOptions struct {
	Namespace   string
	ResourceArg string
	Options     runtime.Object

	Mapper       meta.RESTMapper
	Typer        runtime.ObjectTyper
	ClientMapper resource.ClientMapper
	Decoder      runtime.Decoder

	Object        runtime.Object
	LogsForObject func(object, options runtime.Object) (*restclient.Request, error)

	Out io.Writer
}

LogsOptions .

func (*LogsOptions) Complete

func (o *LogsOptions) Complete(comm *koliutil.CommandParams, args []string) error

Complete .

func (LogsOptions) RunLogs

func (o LogsOptions) RunLogs() (int64, error)

RunLogs retrieves a pod log

func (LogsOptions) Validate

func (o LogsOptions) Validate() error

Validate .

type PortForwardOptions

type PortForwardOptions struct {
	Namespace     string
	PodName       string
	Config        *restclient.Config
	PodClient     coreclient.PodsGetter
	Ports         []string
	PortForwarder portForwarder
	StopChannel   chan struct{}
	ReadyChannel  chan struct{}
}

PortForwardOptions contains all the options for running the port-forward cli command.

func (*PortForwardOptions) Complete

func (o *PortForwardOptions) Complete(comm *koliutil.CommandParams, args []string) error

Complete completes all the required options for port-forward cmd.

func (PortForwardOptions) RunPortForward

func (o PortForwardOptions) RunPortForward() error

RunPortForward implements all the necessary functionality for port-forward cmd.

func (PortForwardOptions) Validate

func (o PortForwardOptions) Validate() error

Validate validates all the required options for port-forward cmd.

type RemoteAttach

type RemoteAttach interface {
	Attach(method string, url *url.URL, config *restclient.Config, stdin io.Reader, stdout, stderr io.Writer, tty bool, terminalSizeQueue term.TerminalSizeQueue) error
}

RemoteAttach defines the interface accepted by the Attach command - provided for test stubbing

type RemoteExecutor

type RemoteExecutor interface {
	Execute(method string, url *url.URL, config *restclient.Config, stdin io.Reader, stdout, stderr io.Writer, tty bool, terminalSizeQueue term.TerminalSizeQueue) error
}

RemoteExecutor defines the interface accepted by the Exec command - provided for test stubbing

type ScaleOptions

type ScaleOptions struct {
	Filenames []string
	Recursive bool
}

ScaleOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()

type StreamOptions

type StreamOptions struct {
	Namespace     string
	PodName       string
	ContainerName string
	Stdin         bool
	TTY           bool
	// minimize unnecessary output
	Quiet bool
	// InterruptParent, if set, is used to handle interrupts while attached
	InterruptParent *interrupt.Handler
	In              io.Reader
	Out             io.Writer
	Err             io.Writer
	// contains filtered or unexported fields
}

StreamOptions .

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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