command

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2017 License: MPL-2.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HealthCritical = 2
	HealthWarn     = 1
	HealthPass     = 0
	HealthUnknown  = 3
)
View Source
const (
	// DefaultHclQuotaInitName is the default name we use when initializing the
	// example quota file in HCL format
	DefaultHclQuotaInitName = "spec.hcl"

	// DefaultHclQuotaInitName is the default name we use when initializing the
	// example quota file in JSON format
	DefaultJsonQuotaInitName = "spec.json"
)
View Source
const (
	// DefaultInitName is the default name we use when
	// initializing the example file
	DefaultInitName = "example.nomad"
)

Variables

This section is empty.

Functions

func Format

func Format(json bool, template string, data interface{}) (string, error)

func NamespacePredictor

func NamespacePredictor(factory ApiClientFactory, filter map[string]struct{}) complete.Predictor

NamespacePredictor returns a namespace predictor that can optionally filter specific namespaces

func QuotaPredictor

func QuotaPredictor(factory ApiClientFactory) complete.Predictor

QuotaPredictor returns a quota predictor

Types

type ACLBootstrapCommand

type ACLBootstrapCommand struct {
	Meta
}

func (*ACLBootstrapCommand) AutocompleteArgs

func (c *ACLBootstrapCommand) AutocompleteArgs() complete.Predictor

func (*ACLBootstrapCommand) AutocompleteFlags

func (c *ACLBootstrapCommand) AutocompleteFlags() complete.Flags

func (*ACLBootstrapCommand) Help

func (c *ACLBootstrapCommand) Help() string

func (*ACLBootstrapCommand) Run

func (c *ACLBootstrapCommand) Run(args []string) int

func (*ACLBootstrapCommand) Synopsis

func (c *ACLBootstrapCommand) Synopsis() string

type ACLCommand

type ACLCommand struct {
	Meta
}

func (*ACLCommand) Help

func (f *ACLCommand) Help() string

func (*ACLCommand) Run

func (f *ACLCommand) Run(args []string) int

func (*ACLCommand) Synopsis

func (f *ACLCommand) Synopsis() string

type ACLPolicyApplyCommand

type ACLPolicyApplyCommand struct {
	Meta
}

func (*ACLPolicyApplyCommand) AutocompleteArgs

func (c *ACLPolicyApplyCommand) AutocompleteArgs() complete.Predictor

func (*ACLPolicyApplyCommand) AutocompleteFlags

func (c *ACLPolicyApplyCommand) AutocompleteFlags() complete.Flags

func (*ACLPolicyApplyCommand) Help

func (c *ACLPolicyApplyCommand) Help() string

func (*ACLPolicyApplyCommand) Run

func (c *ACLPolicyApplyCommand) Run(args []string) int

func (*ACLPolicyApplyCommand) Synopsis

func (c *ACLPolicyApplyCommand) Synopsis() string

type ACLPolicyCommand

type ACLPolicyCommand struct {
	Meta
}

func (*ACLPolicyCommand) Help

func (f *ACLPolicyCommand) Help() string

func (*ACLPolicyCommand) Run

func (f *ACLPolicyCommand) Run(args []string) int

func (*ACLPolicyCommand) Synopsis

func (f *ACLPolicyCommand) Synopsis() string

type ACLPolicyDeleteCommand

type ACLPolicyDeleteCommand struct {
	Meta
}

func (*ACLPolicyDeleteCommand) AutocompleteArgs

func (c *ACLPolicyDeleteCommand) AutocompleteArgs() complete.Predictor

func (*ACLPolicyDeleteCommand) AutocompleteFlags

func (c *ACLPolicyDeleteCommand) AutocompleteFlags() complete.Flags

func (*ACLPolicyDeleteCommand) Help

func (c *ACLPolicyDeleteCommand) Help() string

func (*ACLPolicyDeleteCommand) Run

func (c *ACLPolicyDeleteCommand) Run(args []string) int

func (*ACLPolicyDeleteCommand) Synopsis

func (c *ACLPolicyDeleteCommand) Synopsis() string

type ACLPolicyInfoCommand

type ACLPolicyInfoCommand struct {
	Meta
}

func (*ACLPolicyInfoCommand) AutocompleteArgs

func (c *ACLPolicyInfoCommand) AutocompleteArgs() complete.Predictor

func (*ACLPolicyInfoCommand) AutocompleteFlags

func (c *ACLPolicyInfoCommand) AutocompleteFlags() complete.Flags

func (*ACLPolicyInfoCommand) Help

func (c *ACLPolicyInfoCommand) Help() string

func (*ACLPolicyInfoCommand) Run

func (c *ACLPolicyInfoCommand) Run(args []string) int

func (*ACLPolicyInfoCommand) Synopsis

func (c *ACLPolicyInfoCommand) Synopsis() string

type ACLPolicyListCommand

type ACLPolicyListCommand struct {
	Meta
}

func (*ACLPolicyListCommand) AutocompleteArgs

func (c *ACLPolicyListCommand) AutocompleteArgs() complete.Predictor

func (*ACLPolicyListCommand) AutocompleteFlags

func (c *ACLPolicyListCommand) AutocompleteFlags() complete.Flags

func (*ACLPolicyListCommand) Help

func (c *ACLPolicyListCommand) Help() string

func (*ACLPolicyListCommand) Run

func (c *ACLPolicyListCommand) Run(args []string) int

func (*ACLPolicyListCommand) Synopsis

func (c *ACLPolicyListCommand) Synopsis() string

type ACLTokenCommand

type ACLTokenCommand struct {
	Meta
}

func (*ACLTokenCommand) Help

func (f *ACLTokenCommand) Help() string

func (*ACLTokenCommand) Run

func (f *ACLTokenCommand) Run(args []string) int

func (*ACLTokenCommand) Synopsis

func (f *ACLTokenCommand) Synopsis() string

type ACLTokenCreateCommand

type ACLTokenCreateCommand struct {
	Meta
}

func (*ACLTokenCreateCommand) AutocompleteArgs

func (c *ACLTokenCreateCommand) AutocompleteArgs() complete.Predictor

func (*ACLTokenCreateCommand) AutocompleteFlags

func (c *ACLTokenCreateCommand) AutocompleteFlags() complete.Flags

func (*ACLTokenCreateCommand) Help

func (c *ACLTokenCreateCommand) Help() string

func (*ACLTokenCreateCommand) Run

func (c *ACLTokenCreateCommand) Run(args []string) int

func (*ACLTokenCreateCommand) Synopsis

func (c *ACLTokenCreateCommand) Synopsis() string

type ACLTokenDeleteCommand

type ACLTokenDeleteCommand struct {
	Meta
}

func (*ACLTokenDeleteCommand) AutocompleteArgs

func (c *ACLTokenDeleteCommand) AutocompleteArgs() complete.Predictor

func (*ACLTokenDeleteCommand) AutocompleteFlags

func (c *ACLTokenDeleteCommand) AutocompleteFlags() complete.Flags

func (*ACLTokenDeleteCommand) Help

func (c *ACLTokenDeleteCommand) Help() string

func (*ACLTokenDeleteCommand) Run

func (c *ACLTokenDeleteCommand) Run(args []string) int

func (*ACLTokenDeleteCommand) Synopsis

func (c *ACLTokenDeleteCommand) Synopsis() string

type ACLTokenInfoCommand

type ACLTokenInfoCommand struct {
	Meta
}

func (*ACLTokenInfoCommand) AutocompleteArgs

func (c *ACLTokenInfoCommand) AutocompleteArgs() complete.Predictor

func (*ACLTokenInfoCommand) AutocompleteFlags

func (c *ACLTokenInfoCommand) AutocompleteFlags() complete.Flags

func (*ACLTokenInfoCommand) Help

func (c *ACLTokenInfoCommand) Help() string

func (*ACLTokenInfoCommand) Run

func (c *ACLTokenInfoCommand) Run(args []string) int

func (*ACLTokenInfoCommand) Synopsis

func (c *ACLTokenInfoCommand) Synopsis() string

type ACLTokenSelfCommand

type ACLTokenSelfCommand struct {
	Meta
}

func (*ACLTokenSelfCommand) AutocompleteArgs

func (c *ACLTokenSelfCommand) AutocompleteArgs() complete.Predictor

func (*ACLTokenSelfCommand) AutocompleteFlags

func (c *ACLTokenSelfCommand) AutocompleteFlags() complete.Flags

func (*ACLTokenSelfCommand) Help

func (c *ACLTokenSelfCommand) Help() string

func (*ACLTokenSelfCommand) Run

func (c *ACLTokenSelfCommand) Run(args []string) int

func (*ACLTokenSelfCommand) Synopsis

func (c *ACLTokenSelfCommand) Synopsis() string

type ACLTokenUpdateCommand

type ACLTokenUpdateCommand struct {
	Meta
}

func (*ACLTokenUpdateCommand) AutocompleteArgs

func (c *ACLTokenUpdateCommand) AutocompleteArgs() complete.Predictor

func (*ACLTokenUpdateCommand) AutocompleteFlags

func (c *ACLTokenUpdateCommand) AutocompleteFlags() complete.Flags

func (*ACLTokenUpdateCommand) Help

func (c *ACLTokenUpdateCommand) Help() string

func (*ACLTokenUpdateCommand) Run

func (c *ACLTokenUpdateCommand) Run(args []string) int

func (*ACLTokenUpdateCommand) Synopsis

func (c *ACLTokenUpdateCommand) Synopsis() string

type AgentCheckCommand

type AgentCheckCommand struct {
	Meta
}

func (*AgentCheckCommand) AutocompleteArgs

func (c *AgentCheckCommand) AutocompleteArgs() complete.Predictor

func (*AgentCheckCommand) AutocompleteFlags

func (c *AgentCheckCommand) AutocompleteFlags() complete.Flags

func (*AgentCheckCommand) Help

func (c *AgentCheckCommand) Help() string

func (*AgentCheckCommand) Run

func (c *AgentCheckCommand) Run(args []string) int

func (*AgentCheckCommand) Synopsis

func (c *AgentCheckCommand) Synopsis() string

type AgentInfoCommand

type AgentInfoCommand struct {
	Meta
}

func (*AgentInfoCommand) Help

func (c *AgentInfoCommand) Help() string

func (*AgentInfoCommand) Run

func (c *AgentInfoCommand) Run(args []string) int

func (*AgentInfoCommand) Synopsis

func (c *AgentInfoCommand) Synopsis() string

type AllocStatusCommand

type AllocStatusCommand struct {
	Meta
}

func (*AllocStatusCommand) AutocompleteArgs

func (c *AllocStatusCommand) AutocompleteArgs() complete.Predictor

func (*AllocStatusCommand) AutocompleteFlags

func (c *AllocStatusCommand) AutocompleteFlags() complete.Flags

func (*AllocStatusCommand) Help

func (c *AllocStatusCommand) Help() string

func (*AllocStatusCommand) Run

func (c *AllocStatusCommand) Run(args []string) int

func (*AllocStatusCommand) Synopsis

func (c *AllocStatusCommand) Synopsis() string

type ApiClientFactory

type ApiClientFactory func() (*api.Client, error)

ApiClientFactory is the signature of a API client factory

type ClientConfigCommand

type ClientConfigCommand struct {
	Meta
}

func (*ClientConfigCommand) AutocompleteArgs

func (c *ClientConfigCommand) AutocompleteArgs() complete.Predictor

func (*ClientConfigCommand) AutocompleteFlags

func (c *ClientConfigCommand) AutocompleteFlags() complete.Flags

func (*ClientConfigCommand) Help

func (c *ClientConfigCommand) Help() string

func (*ClientConfigCommand) Run

func (c *ClientConfigCommand) Run(args []string) int

func (*ClientConfigCommand) Synopsis

func (c *ClientConfigCommand) Synopsis() string

type DataFormatter

type DataFormatter interface {
	// TransformData should return transformed string data.
	TransformData(interface{}) (string, error)
}

DataFormatter is a transformer of the data.

func DataFormat

func DataFormat(format, tmpl string) (DataFormatter, error)

DataFormat returns the data formatter specified format.

type DeploymentCommand

type DeploymentCommand struct {
	Meta
}

func (*DeploymentCommand) Help

func (f *DeploymentCommand) Help() string

func (*DeploymentCommand) Run

func (f *DeploymentCommand) Run(args []string) int

func (*DeploymentCommand) Synopsis

func (f *DeploymentCommand) Synopsis() string

type DeploymentFailCommand

type DeploymentFailCommand struct {
	Meta
}

func (*DeploymentFailCommand) AutocompleteArgs

func (c *DeploymentFailCommand) AutocompleteArgs() complete.Predictor

func (*DeploymentFailCommand) AutocompleteFlags

func (c *DeploymentFailCommand) AutocompleteFlags() complete.Flags

func (*DeploymentFailCommand) Help

func (c *DeploymentFailCommand) Help() string

func (*DeploymentFailCommand) Run

func (c *DeploymentFailCommand) Run(args []string) int

func (*DeploymentFailCommand) Synopsis

func (c *DeploymentFailCommand) Synopsis() string

type DeploymentListCommand

type DeploymentListCommand struct {
	Meta
}

func (*DeploymentListCommand) AutocompleteArgs

func (c *DeploymentListCommand) AutocompleteArgs() complete.Predictor

func (*DeploymentListCommand) AutocompleteFlags

func (c *DeploymentListCommand) AutocompleteFlags() complete.Flags

func (*DeploymentListCommand) Help

func (c *DeploymentListCommand) Help() string

func (*DeploymentListCommand) Run

func (c *DeploymentListCommand) Run(args []string) int

func (*DeploymentListCommand) Synopsis

func (c *DeploymentListCommand) Synopsis() string

type DeploymentPauseCommand

type DeploymentPauseCommand struct {
	Meta
}

func (*DeploymentPauseCommand) AutocompleteArgs

func (c *DeploymentPauseCommand) AutocompleteArgs() complete.Predictor

func (*DeploymentPauseCommand) AutocompleteFlags

func (c *DeploymentPauseCommand) AutocompleteFlags() complete.Flags

func (*DeploymentPauseCommand) Help

func (c *DeploymentPauseCommand) Help() string

func (*DeploymentPauseCommand) Run

func (c *DeploymentPauseCommand) Run(args []string) int

func (*DeploymentPauseCommand) Synopsis

func (c *DeploymentPauseCommand) Synopsis() string

type DeploymentPromoteCommand

type DeploymentPromoteCommand struct {
	Meta
}

func (*DeploymentPromoteCommand) AutocompleteArgs

func (c *DeploymentPromoteCommand) AutocompleteArgs() complete.Predictor

func (*DeploymentPromoteCommand) AutocompleteFlags

func (c *DeploymentPromoteCommand) AutocompleteFlags() complete.Flags

func (*DeploymentPromoteCommand) Help

func (c *DeploymentPromoteCommand) Help() string

func (*DeploymentPromoteCommand) Run

func (c *DeploymentPromoteCommand) Run(args []string) int

func (*DeploymentPromoteCommand) Synopsis

func (c *DeploymentPromoteCommand) Synopsis() string

type DeploymentResumeCommand

type DeploymentResumeCommand struct {
	Meta
}

func (*DeploymentResumeCommand) AutocompleteArgs

func (c *DeploymentResumeCommand) AutocompleteArgs() complete.Predictor

func (*DeploymentResumeCommand) AutocompleteFlags

func (c *DeploymentResumeCommand) AutocompleteFlags() complete.Flags

func (*DeploymentResumeCommand) Help

func (c *DeploymentResumeCommand) Help() string

func (*DeploymentResumeCommand) Run

func (c *DeploymentResumeCommand) Run(args []string) int

func (*DeploymentResumeCommand) Synopsis

func (c *DeploymentResumeCommand) Synopsis() string

type DeploymentStatusCommand

type DeploymentStatusCommand struct {
	Meta
}

func (*DeploymentStatusCommand) AutocompleteArgs

func (c *DeploymentStatusCommand) AutocompleteArgs() complete.Predictor

func (*DeploymentStatusCommand) AutocompleteFlags

func (c *DeploymentStatusCommand) AutocompleteFlags() complete.Flags

func (*DeploymentStatusCommand) Help

func (c *DeploymentStatusCommand) Help() string

func (*DeploymentStatusCommand) Run

func (c *DeploymentStatusCommand) Run(args []string) int

func (*DeploymentStatusCommand) Synopsis

func (c *DeploymentStatusCommand) Synopsis() string

type EvalStatusCommand

type EvalStatusCommand struct {
	Meta
}

func (*EvalStatusCommand) AutocompleteArgs

func (c *EvalStatusCommand) AutocompleteArgs() complete.Predictor

func (*EvalStatusCommand) AutocompleteFlags

func (c *EvalStatusCommand) AutocompleteFlags() complete.Flags

func (*EvalStatusCommand) Help

func (c *EvalStatusCommand) Help() string

func (*EvalStatusCommand) Run

func (c *EvalStatusCommand) Run(args []string) int

func (*EvalStatusCommand) Synopsis

func (c *EvalStatusCommand) Synopsis() string

type ExecutorPluginCommand

type ExecutorPluginCommand struct {
	Meta
}

func (*ExecutorPluginCommand) Help

func (e *ExecutorPluginCommand) Help() string

func (*ExecutorPluginCommand) Run

func (e *ExecutorPluginCommand) Run(args []string) int

func (*ExecutorPluginCommand) Synopsis

func (e *ExecutorPluginCommand) Synopsis() string

type FSCommand

type FSCommand struct {
	Meta
}

func (*FSCommand) AutocompleteArgs

func (f *FSCommand) AutocompleteArgs() complete.Predictor

func (*FSCommand) AutocompleteFlags

func (c *FSCommand) AutocompleteFlags() complete.Flags

func (*FSCommand) Help

func (f *FSCommand) Help() string

func (*FSCommand) Run

func (f *FSCommand) Run(args []string) int

func (*FSCommand) Synopsis

func (f *FSCommand) Synopsis() string

type FlagSetFlags

type FlagSetFlags uint

FlagSetFlags is an enum to define what flags are present in the default FlagSet returned by Meta.FlagSet.

const (
	FlagSetNone    FlagSetFlags = 0
	FlagSetClient  FlagSetFlags = 1 << iota
	FlagSetDefault              = FlagSetClient
)

type InitCommand

type InitCommand struct {
	Meta
}

InitCommand generates a new job template that you can customize to your liking, like vagrant init

func (*InitCommand) Help

func (c *InitCommand) Help() string

func (*InitCommand) Run

func (c *InitCommand) Run(args []string) int

func (*InitCommand) Synopsis

func (c *InitCommand) Synopsis() string

type InspectCommand

type InspectCommand struct {
	Meta
}

func (*InspectCommand) AutocompleteArgs

func (c *InspectCommand) AutocompleteArgs() complete.Predictor

func (*InspectCommand) AutocompleteFlags

func (c *InspectCommand) AutocompleteFlags() complete.Flags

func (*InspectCommand) Help

func (c *InspectCommand) Help() string

func (*InspectCommand) Run

func (c *InspectCommand) Run(args []string) int

func (*InspectCommand) Synopsis

func (c *InspectCommand) Synopsis() string

type JSONFormat

type JSONFormat struct {
}

func (*JSONFormat) TransformData

func (p *JSONFormat) TransformData(data interface{}) (string, error)

TransformData returns JSON format string data.

type JobCommand

type JobCommand struct {
	Meta
}

func (*JobCommand) Help

func (f *JobCommand) Help() string

func (*JobCommand) Run

func (f *JobCommand) Run(args []string) int

func (*JobCommand) Synopsis

func (f *JobCommand) Synopsis() string

type JobDeploymentsCommand

type JobDeploymentsCommand struct {
	Meta
}

func (*JobDeploymentsCommand) AutocompleteArgs

func (c *JobDeploymentsCommand) AutocompleteArgs() complete.Predictor

func (*JobDeploymentsCommand) AutocompleteFlags

func (c *JobDeploymentsCommand) AutocompleteFlags() complete.Flags

func (*JobDeploymentsCommand) Help

func (c *JobDeploymentsCommand) Help() string

func (*JobDeploymentsCommand) Run

func (c *JobDeploymentsCommand) Run(args []string) int

func (*JobDeploymentsCommand) Synopsis

func (c *JobDeploymentsCommand) Synopsis() string

type JobDispatchCommand

type JobDispatchCommand struct {
	Meta
}

func (*JobDispatchCommand) AutocompleteArgs

func (c *JobDispatchCommand) AutocompleteArgs() complete.Predictor

func (*JobDispatchCommand) AutocompleteFlags

func (c *JobDispatchCommand) AutocompleteFlags() complete.Flags

func (*JobDispatchCommand) Help

func (c *JobDispatchCommand) Help() string

func (*JobDispatchCommand) Run

func (c *JobDispatchCommand) Run(args []string) int

func (*JobDispatchCommand) Synopsis

func (c *JobDispatchCommand) Synopsis() string

type JobGetter

type JobGetter struct {
	// contains filtered or unexported fields
}

func (*JobGetter) ApiJob

func (j *JobGetter) ApiJob(jpath string) (*api.Job, error)

StructJob returns the Job struct from jobfile.

type JobHistoryCommand

type JobHistoryCommand struct {
	Meta
	// contains filtered or unexported fields
}

func (*JobHistoryCommand) AutocompleteArgs

func (c *JobHistoryCommand) AutocompleteArgs() complete.Predictor

func (*JobHistoryCommand) Autocompleteflags

func (c *JobHistoryCommand) Autocompleteflags() complete.Flags

func (*JobHistoryCommand) Help

func (c *JobHistoryCommand) Help() string

func (*JobHistoryCommand) Run

func (c *JobHistoryCommand) Run(args []string) int

func (*JobHistoryCommand) Synopsis

func (c *JobHistoryCommand) Synopsis() string

type JobPromoteCommand

type JobPromoteCommand struct {
	Meta
}

func (*JobPromoteCommand) AutocompleteArgs

func (c *JobPromoteCommand) AutocompleteArgs() complete.Predictor

func (*JobPromoteCommand) AutocompleteFlags

func (c *JobPromoteCommand) AutocompleteFlags() complete.Flags

func (*JobPromoteCommand) Help

func (c *JobPromoteCommand) Help() string

func (*JobPromoteCommand) Run

func (c *JobPromoteCommand) Run(args []string) int

func (*JobPromoteCommand) Synopsis

func (c *JobPromoteCommand) Synopsis() string

type JobRevertCommand

type JobRevertCommand struct {
	Meta
}

func (*JobRevertCommand) AutocompleteArgs

func (c *JobRevertCommand) AutocompleteArgs() complete.Predictor

func (*JobRevertCommand) AutocompleteFlags

func (c *JobRevertCommand) AutocompleteFlags() complete.Flags

func (*JobRevertCommand) Help

func (c *JobRevertCommand) Help() string

func (*JobRevertCommand) Run

func (c *JobRevertCommand) Run(args []string) int

func (*JobRevertCommand) Synopsis

func (c *JobRevertCommand) Synopsis() string

type JobStatusCommand

type JobStatusCommand struct {
	Meta
	// contains filtered or unexported fields
}

func (*JobStatusCommand) AutocompleteArgs

func (c *JobStatusCommand) AutocompleteArgs() complete.Predictor

func (*JobStatusCommand) AutocompleteFlags

func (c *JobStatusCommand) AutocompleteFlags() complete.Flags

func (*JobStatusCommand) Help

func (c *JobStatusCommand) Help() string

func (*JobStatusCommand) Run

func (c *JobStatusCommand) Run(args []string) int

func (*JobStatusCommand) Synopsis

func (c *JobStatusCommand) Synopsis() string

type KeygenCommand

type KeygenCommand struct {
	Meta
}

KeygenCommand is a Command implementation that generates an encryption key for use in `nomad agent`.

func (*KeygenCommand) Help

func (c *KeygenCommand) Help() string

func (*KeygenCommand) Run

func (c *KeygenCommand) Run(_ []string) int

func (*KeygenCommand) Synopsis

func (c *KeygenCommand) Synopsis() string

type KeyringCommand

type KeyringCommand struct {
	Meta
}

KeyringCommand is a Command implementation that handles querying, installing, and removing gossip encryption keys from a keyring.

func (*KeyringCommand) AutocompleteArgs

func (c *KeyringCommand) AutocompleteArgs() complete.Predictor

func (*KeyringCommand) AutocompleteFlags

func (c *KeyringCommand) AutocompleteFlags() complete.Flags

func (*KeyringCommand) Help

func (c *KeyringCommand) Help() string

func (*KeyringCommand) Run

func (c *KeyringCommand) Run(args []string) int

func (*KeyringCommand) Synopsis

func (c *KeyringCommand) Synopsis() string

type LineLimitReader

type LineLimitReader struct {
	io.ReadCloser
	// contains filtered or unexported fields
}

LineLimitReader wraps another reader and provides `tail -n` like behavior. LineLimitReader buffers up to the searchLimit and returns `-n` number of lines. After those lines have been returned, LineLimitReader streams the underlying ReadCloser

func NewLineLimitReader

func NewLineLimitReader(r io.ReadCloser, lines, searchLimit int, timeLimit time.Duration) *LineLimitReader

NewLineLimitReader takes the ReadCloser to wrap, the number of lines to find searching backwards in the first searchLimit bytes. timeLimit can optionally be specified by passing a non-zero duration. When set, the search for the last n lines is aborted if no data has been read in the duration. This can be used to flush what is had if no extra data is being received. When used, the underlying reader must not block forever and must periodically unblock even when no data has been read.

func (*LineLimitReader) Read

func (l *LineLimitReader) Read(p []byte) (n int, err error)

type LogsCommand

type LogsCommand struct {
	Meta
}

func (*LogsCommand) AutocompleteArgs

func (l *LogsCommand) AutocompleteArgs() complete.Predictor

func (*LogsCommand) AutocompleteFlags

func (c *LogsCommand) AutocompleteFlags() complete.Flags

func (*LogsCommand) Help

func (l *LogsCommand) Help() string

func (*LogsCommand) Run

func (l *LogsCommand) Run(args []string) int

func (*LogsCommand) Synopsis

func (l *LogsCommand) Synopsis() string

type Meta

type Meta struct {
	Ui cli.Ui
	// contains filtered or unexported fields
}

Meta contains the meta-options and functionality that nearly every Nomad command inherits.

func (*Meta) AutocompleteFlags

func (m *Meta) AutocompleteFlags(fs FlagSetFlags) complete.Flags

AutocompleteFlags returns a set of flag completions for the given flag set.

func (*Meta) Client

func (m *Meta) Client() (*api.Client, error)

Client is used to initialize and return a new API client using the default command line arguments and env vars.

func (*Meta) Colorize

func (m *Meta) Colorize() *colorstring.Colorize

func (*Meta) FlagSet

func (m *Meta) FlagSet(n string, fs FlagSetFlags) *flag.FlagSet

FlagSet returns a FlagSet with the common flags that every command implements. The exact behavior of FlagSet can be configured using the flags as the second parameter, for example to disable server settings on the commands that don't talk to a server.

type NamespaceApplyCommand

type NamespaceApplyCommand struct {
	Meta
}

func (*NamespaceApplyCommand) AutocompleteArgs

func (c *NamespaceApplyCommand) AutocompleteArgs() complete.Predictor

func (*NamespaceApplyCommand) AutocompleteFlags

func (c *NamespaceApplyCommand) AutocompleteFlags() complete.Flags

func (*NamespaceApplyCommand) Help

func (c *NamespaceApplyCommand) Help() string

func (*NamespaceApplyCommand) Run

func (c *NamespaceApplyCommand) Run(args []string) int

func (*NamespaceApplyCommand) Synopsis

func (c *NamespaceApplyCommand) Synopsis() string

type NamespaceCommand

type NamespaceCommand struct {
	Meta
}

func (*NamespaceCommand) Help

func (f *NamespaceCommand) Help() string

func (*NamespaceCommand) Run

func (f *NamespaceCommand) Run(args []string) int

func (*NamespaceCommand) Synopsis

func (f *NamespaceCommand) Synopsis() string

type NamespaceDeleteCommand

type NamespaceDeleteCommand struct {
	Meta
}

func (*NamespaceDeleteCommand) AutocompleteArgs

func (c *NamespaceDeleteCommand) AutocompleteArgs() complete.Predictor

func (*NamespaceDeleteCommand) AutocompleteFlags

func (c *NamespaceDeleteCommand) AutocompleteFlags() complete.Flags

func (*NamespaceDeleteCommand) Help

func (c *NamespaceDeleteCommand) Help() string

func (*NamespaceDeleteCommand) Run

func (c *NamespaceDeleteCommand) Run(args []string) int

func (*NamespaceDeleteCommand) Synopsis

func (c *NamespaceDeleteCommand) Synopsis() string

type NamespaceInspectCommand

type NamespaceInspectCommand struct {
	Meta
}

func (*NamespaceInspectCommand) AutocompleteArgs

func (c *NamespaceInspectCommand) AutocompleteArgs() complete.Predictor

func (*NamespaceInspectCommand) AutocompleteFlags

func (c *NamespaceInspectCommand) AutocompleteFlags() complete.Flags

func (*NamespaceInspectCommand) Help

func (c *NamespaceInspectCommand) Help() string

func (*NamespaceInspectCommand) Run

func (c *NamespaceInspectCommand) Run(args []string) int

func (*NamespaceInspectCommand) Synopsis

func (c *NamespaceInspectCommand) Synopsis() string

type NamespaceListCommand

type NamespaceListCommand struct {
	Meta
}

func (*NamespaceListCommand) AutocompleteArgs

func (c *NamespaceListCommand) AutocompleteArgs() complete.Predictor

func (*NamespaceListCommand) AutocompleteFlags

func (c *NamespaceListCommand) AutocompleteFlags() complete.Flags

func (*NamespaceListCommand) Help

func (c *NamespaceListCommand) Help() string

func (*NamespaceListCommand) Run

func (c *NamespaceListCommand) Run(args []string) int

func (*NamespaceListCommand) Synopsis

func (c *NamespaceListCommand) Synopsis() string

type NamespaceStatusCommand

type NamespaceStatusCommand struct {
	Meta
}

func (*NamespaceStatusCommand) AutocompleteArgs

func (c *NamespaceStatusCommand) AutocompleteArgs() complete.Predictor

func (*NamespaceStatusCommand) AutocompleteFlags

func (c *NamespaceStatusCommand) AutocompleteFlags() complete.Flags

func (*NamespaceStatusCommand) Help

func (c *NamespaceStatusCommand) Help() string

func (*NamespaceStatusCommand) Run

func (c *NamespaceStatusCommand) Run(args []string) int

func (*NamespaceStatusCommand) Synopsis

func (c *NamespaceStatusCommand) Synopsis() string

type NodeDrainCommand

type NodeDrainCommand struct {
	Meta
}

func (*NodeDrainCommand) AutocompleteArgs

func (c *NodeDrainCommand) AutocompleteArgs() complete.Predictor

func (*NodeDrainCommand) AutocompleteFlags

func (c *NodeDrainCommand) AutocompleteFlags() complete.Flags

func (*NodeDrainCommand) Help

func (c *NodeDrainCommand) Help() string

func (*NodeDrainCommand) Run

func (c *NodeDrainCommand) Run(args []string) int

func (*NodeDrainCommand) Synopsis

func (c *NodeDrainCommand) Synopsis() string

type NodeStatusCommand

type NodeStatusCommand struct {
	Meta
	// contains filtered or unexported fields
}

func (*NodeStatusCommand) AutocompleteArgs

func (c *NodeStatusCommand) AutocompleteArgs() complete.Predictor

func (*NodeStatusCommand) AutocompleteFlags

func (c *NodeStatusCommand) AutocompleteFlags() complete.Flags

func (*NodeStatusCommand) Help

func (c *NodeStatusCommand) Help() string

func (*NodeStatusCommand) Run

func (c *NodeStatusCommand) Run(args []string) int

func (*NodeStatusCommand) Synopsis

func (c *NodeStatusCommand) Synopsis() string

type OperatorCommand

type OperatorCommand struct {
	Meta
}

func (*OperatorCommand) Help

func (f *OperatorCommand) Help() string

func (*OperatorCommand) Run

func (f *OperatorCommand) Run(args []string) int

func (*OperatorCommand) Synopsis

func (f *OperatorCommand) Synopsis() string

type OperatorRaftCommand

type OperatorRaftCommand struct {
	Meta
}

func (*OperatorRaftCommand) Help

func (c *OperatorRaftCommand) Help() string

func (*OperatorRaftCommand) Run

func (c *OperatorRaftCommand) Run(args []string) int

func (*OperatorRaftCommand) Synopsis

func (c *OperatorRaftCommand) Synopsis() string

type OperatorRaftListCommand

type OperatorRaftListCommand struct {
	Meta
}

func (*OperatorRaftListCommand) AutocompleteArgs

func (c *OperatorRaftListCommand) AutocompleteArgs() complete.Predictor

func (*OperatorRaftListCommand) AutocompleteFlags

func (c *OperatorRaftListCommand) AutocompleteFlags() complete.Flags

func (*OperatorRaftListCommand) Help

func (c *OperatorRaftListCommand) Help() string

func (*OperatorRaftListCommand) Run

func (c *OperatorRaftListCommand) Run(args []string) int

func (*OperatorRaftListCommand) Synopsis

func (c *OperatorRaftListCommand) Synopsis() string

type OperatorRaftRemoveCommand

type OperatorRaftRemoveCommand struct {
	Meta
}

func (*OperatorRaftRemoveCommand) AutocompleteArgs

func (c *OperatorRaftRemoveCommand) AutocompleteArgs() complete.Predictor

func (*OperatorRaftRemoveCommand) AutocompleteFlags

func (c *OperatorRaftRemoveCommand) AutocompleteFlags() complete.Flags

func (*OperatorRaftRemoveCommand) Help

func (*OperatorRaftRemoveCommand) Run

func (c *OperatorRaftRemoveCommand) Run(args []string) int

func (*OperatorRaftRemoveCommand) Synopsis

func (c *OperatorRaftRemoveCommand) Synopsis() string

type PlanCommand

type PlanCommand struct {
	Meta
	JobGetter
}

func (*PlanCommand) AutocompleteArgs

func (c *PlanCommand) AutocompleteArgs() complete.Predictor

func (*PlanCommand) AutocompleteFlags

func (c *PlanCommand) AutocompleteFlags() complete.Flags

func (*PlanCommand) Help

func (c *PlanCommand) Help() string

func (*PlanCommand) Run

func (c *PlanCommand) Run(args []string) int

func (*PlanCommand) Synopsis

func (c *PlanCommand) Synopsis() string

type QuotaApplyCommand

type QuotaApplyCommand struct {
	Meta
}

func (*QuotaApplyCommand) AutocompleteArgs

func (c *QuotaApplyCommand) AutocompleteArgs() complete.Predictor

func (*QuotaApplyCommand) AutocompleteFlags

func (c *QuotaApplyCommand) AutocompleteFlags() complete.Flags

func (*QuotaApplyCommand) Help

func (c *QuotaApplyCommand) Help() string

func (*QuotaApplyCommand) Run

func (c *QuotaApplyCommand) Run(args []string) int

func (*QuotaApplyCommand) Synopsis

func (c *QuotaApplyCommand) Synopsis() string

type QuotaCommand

type QuotaCommand struct {
	Meta
}

func (*QuotaCommand) Help

func (f *QuotaCommand) Help() string

func (*QuotaCommand) Run

func (f *QuotaCommand) Run(args []string) int

func (*QuotaCommand) Synopsis

func (f *QuotaCommand) Synopsis() string

type QuotaDeleteCommand

type QuotaDeleteCommand struct {
	Meta
}

func (*QuotaDeleteCommand) AutocompleteArgs

func (c *QuotaDeleteCommand) AutocompleteArgs() complete.Predictor

func (*QuotaDeleteCommand) AutocompleteFlags

func (c *QuotaDeleteCommand) AutocompleteFlags() complete.Flags

func (*QuotaDeleteCommand) Help

func (c *QuotaDeleteCommand) Help() string

func (*QuotaDeleteCommand) Run

func (c *QuotaDeleteCommand) Run(args []string) int

func (*QuotaDeleteCommand) Synopsis

func (c *QuotaDeleteCommand) Synopsis() string

type QuotaInitCommand

type QuotaInitCommand struct {
	Meta
}

QuotaInitCommand generates a new quota spec that you can customize to your liking, like vagrant init

func (*QuotaInitCommand) AutocompleteArgs

func (c *QuotaInitCommand) AutocompleteArgs() complete.Predictor

func (*QuotaInitCommand) AutocompleteFlags

func (c *QuotaInitCommand) AutocompleteFlags() complete.Flags

func (*QuotaInitCommand) Help

func (c *QuotaInitCommand) Help() string

func (*QuotaInitCommand) Run

func (c *QuotaInitCommand) Run(args []string) int

func (*QuotaInitCommand) Synopsis

func (c *QuotaInitCommand) Synopsis() string

type QuotaInspectCommand

type QuotaInspectCommand struct {
	Meta
}

func (*QuotaInspectCommand) AutocompleteArgs

func (c *QuotaInspectCommand) AutocompleteArgs() complete.Predictor

func (*QuotaInspectCommand) AutocompleteFlags

func (c *QuotaInspectCommand) AutocompleteFlags() complete.Flags

func (*QuotaInspectCommand) Help

func (c *QuotaInspectCommand) Help() string

func (*QuotaInspectCommand) Run

func (c *QuotaInspectCommand) Run(args []string) int

func (*QuotaInspectCommand) Synopsis

func (c *QuotaInspectCommand) Synopsis() string

type QuotaListCommand

type QuotaListCommand struct {
	Meta
}

func (*QuotaListCommand) AutocompleteArgs

func (c *QuotaListCommand) AutocompleteArgs() complete.Predictor

func (*QuotaListCommand) AutocompleteFlags

func (c *QuotaListCommand) AutocompleteFlags() complete.Flags

func (*QuotaListCommand) Help

func (c *QuotaListCommand) Help() string

func (*QuotaListCommand) Run

func (c *QuotaListCommand) Run(args []string) int

func (*QuotaListCommand) Synopsis

func (c *QuotaListCommand) Synopsis() string

type QuotaStatusCommand

type QuotaStatusCommand struct {
	Meta
}

func (*QuotaStatusCommand) AutocompleteArgs

func (c *QuotaStatusCommand) AutocompleteArgs() complete.Predictor

func (*QuotaStatusCommand) AutocompleteFlags

func (c *QuotaStatusCommand) AutocompleteFlags() complete.Flags

func (*QuotaStatusCommand) Help

func (c *QuotaStatusCommand) Help() string

func (*QuotaStatusCommand) Run

func (c *QuotaStatusCommand) Run(args []string) int

func (*QuotaStatusCommand) Synopsis

func (c *QuotaStatusCommand) Synopsis() string

type RunCommand

type RunCommand struct {
	Meta
	JobGetter
}

func (*RunCommand) AutocompleteArgs

func (c *RunCommand) AutocompleteArgs() complete.Predictor

func (*RunCommand) AutocompleteFlags

func (c *RunCommand) AutocompleteFlags() complete.Flags

func (*RunCommand) Help

func (c *RunCommand) Help() string

func (*RunCommand) Run

func (c *RunCommand) Run(args []string) int

func (*RunCommand) Synopsis

func (c *RunCommand) Synopsis() string

type SentinelApplyCommand

type SentinelApplyCommand struct {
	Meta
}

func (*SentinelApplyCommand) AutocompleteArgs

func (c *SentinelApplyCommand) AutocompleteArgs() complete.Predictor

func (*SentinelApplyCommand) AutocompleteFlags

func (c *SentinelApplyCommand) AutocompleteFlags() complete.Flags

func (*SentinelApplyCommand) Help

func (c *SentinelApplyCommand) Help() string

func (*SentinelApplyCommand) Run

func (c *SentinelApplyCommand) Run(args []string) int

func (*SentinelApplyCommand) Synopsis

func (c *SentinelApplyCommand) Synopsis() string

type SentinelCommand

type SentinelCommand struct {
	Meta
}

func (*SentinelCommand) Help

func (f *SentinelCommand) Help() string

func (*SentinelCommand) Run

func (f *SentinelCommand) Run(args []string) int

func (*SentinelCommand) Synopsis

func (f *SentinelCommand) Synopsis() string

type SentinelDeleteCommand

type SentinelDeleteCommand struct {
	Meta
}

func (*SentinelDeleteCommand) AutocompleteArgs

func (c *SentinelDeleteCommand) AutocompleteArgs() complete.Predictor

func (*SentinelDeleteCommand) AutocompleteFlags

func (c *SentinelDeleteCommand) AutocompleteFlags() complete.Flags

func (*SentinelDeleteCommand) Help

func (c *SentinelDeleteCommand) Help() string

func (*SentinelDeleteCommand) Run

func (c *SentinelDeleteCommand) Run(args []string) int

func (*SentinelDeleteCommand) Synopsis

func (c *SentinelDeleteCommand) Synopsis() string

type SentinelListCommand

type SentinelListCommand struct {
	Meta
}

func (*SentinelListCommand) AutocompleteArgs

func (c *SentinelListCommand) AutocompleteArgs() complete.Predictor

func (*SentinelListCommand) AutocompleteFlags

func (c *SentinelListCommand) AutocompleteFlags() complete.Flags

func (*SentinelListCommand) Help

func (c *SentinelListCommand) Help() string

func (*SentinelListCommand) Run

func (c *SentinelListCommand) Run(args []string) int

func (*SentinelListCommand) Synopsis

func (c *SentinelListCommand) Synopsis() string

type SentinelReadCommand

type SentinelReadCommand struct {
	Meta
}

func (*SentinelReadCommand) AutocompleteArgs

func (c *SentinelReadCommand) AutocompleteArgs() complete.Predictor

func (*SentinelReadCommand) AutocompleteFlags

func (c *SentinelReadCommand) AutocompleteFlags() complete.Flags

func (*SentinelReadCommand) Help

func (c *SentinelReadCommand) Help() string

func (*SentinelReadCommand) Run

func (c *SentinelReadCommand) Run(args []string) int

func (*SentinelReadCommand) Synopsis

func (c *SentinelReadCommand) Synopsis() string

type ServerForceLeaveCommand

type ServerForceLeaveCommand struct {
	Meta
}

func (*ServerForceLeaveCommand) Help

func (c *ServerForceLeaveCommand) Help() string

func (*ServerForceLeaveCommand) Run

func (c *ServerForceLeaveCommand) Run(args []string) int

func (*ServerForceLeaveCommand) Synopsis

func (c *ServerForceLeaveCommand) Synopsis() string

type ServerJoinCommand

type ServerJoinCommand struct {
	Meta
}

func (*ServerJoinCommand) Help

func (c *ServerJoinCommand) Help() string

func (*ServerJoinCommand) Run

func (c *ServerJoinCommand) Run(args []string) int

func (*ServerJoinCommand) Synopsis

func (c *ServerJoinCommand) Synopsis() string

type ServerMembersCommand

type ServerMembersCommand struct {
	Meta
}

func (*ServerMembersCommand) AutocompleteArgs

func (c *ServerMembersCommand) AutocompleteArgs() complete.Predictor

func (*ServerMembersCommand) AutocompleteFlags

func (c *ServerMembersCommand) AutocompleteFlags() complete.Flags

func (*ServerMembersCommand) Help

func (c *ServerMembersCommand) Help() string

func (*ServerMembersCommand) Run

func (c *ServerMembersCommand) Run(args []string) int

func (*ServerMembersCommand) Synopsis

func (c *ServerMembersCommand) Synopsis() string

type StatusCommand

type StatusCommand struct {
	Meta
}

func (*StatusCommand) AutocompleteArgs

func (c *StatusCommand) AutocompleteArgs() complete.Predictor

func (*StatusCommand) AutocompleteFlags

func (c *StatusCommand) AutocompleteFlags() complete.Flags

func (*StatusCommand) Help

func (s *StatusCommand) Help() string

func (*StatusCommand) Run

func (c *StatusCommand) Run(args []string) int

func (*StatusCommand) Synopsis

func (c *StatusCommand) Synopsis() string

type StopCommand

type StopCommand struct {
	Meta
}

func (*StopCommand) AutocompleteArgs

func (c *StopCommand) AutocompleteArgs() complete.Predictor

func (*StopCommand) AutocompleteFlags

func (c *StopCommand) AutocompleteFlags() complete.Flags

func (*StopCommand) Help

func (c *StopCommand) Help() string

func (*StopCommand) Run

func (c *StopCommand) Run(args []string) int

func (*StopCommand) Synopsis

func (c *StopCommand) Synopsis() string

type TemplateFormat

type TemplateFormat struct {
	// contains filtered or unexported fields
}

func (*TemplateFormat) TransformData

func (p *TemplateFormat) TransformData(data interface{}) (string, error)

TransformData returns template format string data.

type UiCommand

type UiCommand struct {
	Meta
}

func (*UiCommand) AutocompleteArgs

func (c *UiCommand) AutocompleteArgs() complete.Predictor

func (*UiCommand) AutocompleteFlags

func (c *UiCommand) AutocompleteFlags() complete.Flags

func (*UiCommand) Help

func (c *UiCommand) Help() string

func (*UiCommand) Run

func (c *UiCommand) Run(args []string) int

func (*UiCommand) Synopsis

func (c *UiCommand) Synopsis() string

type ValidateCommand

type ValidateCommand struct {
	Meta
	JobGetter
}

func (*ValidateCommand) AutocompleteArgs

func (c *ValidateCommand) AutocompleteArgs() complete.Predictor

func (*ValidateCommand) AutocompleteFlags

func (c *ValidateCommand) AutocompleteFlags() complete.Flags

func (*ValidateCommand) Help

func (c *ValidateCommand) Help() string

func (*ValidateCommand) Run

func (c *ValidateCommand) Run(args []string) int

func (*ValidateCommand) Synopsis

func (c *ValidateCommand) Synopsis() string

type VersionCommand

type VersionCommand struct {
	Version *version.VersionInfo
	Ui      cli.Ui
}

VersionCommand is a Command implementation prints the version.

func (*VersionCommand) Help

func (c *VersionCommand) Help() string

func (*VersionCommand) Run

func (c *VersionCommand) Run(_ []string) int

func (*VersionCommand) Synopsis

func (c *VersionCommand) Synopsis() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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