commands

package
v0.0.0-...-ac11951 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2016 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddBatchContext

type AddBatchContext struct {
	Nodes      *int
	Cluster    *string
	Datacenter *string
	HostFormat *string
	Subnet     *string
}

AddBatchContext Represents context information about the AddBatch command.

type AddContext

type AddContext struct {
	// Progress   *pb.ProgressBar
	Cluster    *string
	Datacenter *string
	Host       *string
	IPAddress  *string
	// contains filtered or unexported fields
}

AddContext Represents context information about the Add command.

type Command

type Command struct {
	Progress      *pb.ProgressBar
	Results       []string
	NumberOfSteps int
	Steps         []RunFunc
	Context       interface{}
	NoProgress    *bool
	IsSubCommand  bool
	RequiresSudo  bool
}

Command Represents a command.

func NewAddBatchCommand

func NewAddBatchCommand() *Command

NewAddBatchCommand Returns a new instance of AddBatch Command.

func NewAddCommand

func NewAddCommand() *Command

NewAddCommand Returns a new instance of Add Command.

func NewCommand

func NewCommand(steps []RunFunc) *Command

NewCommand Returns a new instance of Command.

func NewRemoveBatchCommand

func NewRemoveBatchCommand() *Command

NewRemoveBatchCommand Returns a new instance of RemoveBatch Command.

func NewRemoveCommand

func NewRemoveCommand() *Command

NewRemoveCommand Returns a new instance of Remove Command.

func (*Command) Run

func (cmd *Command) Run(c *kingpin.ParseContext) error

Run Executes the command.

func (*Command) RunSteps

func (cmd *Command) RunSteps() (string, error)

RunSteps Runs the provided steps and returns errors.

func (*Command) SetContext

func (cmd *Command) SetContext(context interface{})

SetContext Sets the commands context.

type LsCommand

type LsCommand struct {
	Cluster    *string
	Datacenter *string
	Host       *string
}

LsCommand Context for "ls" command

func (*LsCommand) Run

func (cmd *LsCommand) Run(c *kingpin.ParseContext) error

Run Executes the command like action.

type RemoveBatchContext

type RemoveBatchContext struct {
	Nodes      *int
	HostFormat *string
}

RemoveBatchContext Represents context information about the RemoveBatch command.

type RemoveContext

type RemoveContext struct {
	Host      *string
	Container *types.Container
}

RemoveContext Represents context information about the Remove command.

type RunFunc

type RunFunc func(cmd *Command) error

RunFunc Function that executes a command step.

Jump to

Keyboard shortcuts

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