Documentation ¶
Index ¶
- Constants
- func Format(json bool, template string, data interface{}) (string, error)
- type AgentCheckCommand
- type AgentInfoCommand
- type AllocStatusCommand
- type ClientConfigCommand
- type DataFormatter
- type DeploymentCommand
- type DeploymentFailCommand
- type DeploymentListCommand
- type DeploymentPauseCommand
- type DeploymentPromoteCommand
- type DeploymentResumeCommand
- type DeploymentStatusCommand
- type EvalStatusCommand
- type ExecutorPluginCommand
- type FSCommand
- type FlagSetFlags
- type InitCommand
- type InspectCommand
- type JSONFormat
- type JobCommand
- type JobDeploymentsCommand
- type JobDispatchCommand
- type JobGetter
- type JobHistoryCommand
- type JobRevertCommand
- type KeygenCommand
- type KeyringCommand
- type LineLimitReader
- type LogsCommand
- type Meta
- type NodeDrainCommand
- type NodeStatusCommand
- type OperatorCommand
- type OperatorRaftCommand
- type OperatorRaftListCommand
- type OperatorRaftRemoveCommand
- type PlanCommand
- type RunCommand
- type ServerForceLeaveCommand
- type ServerJoinCommand
- type ServerMembersCommand
- type StatusCommand
- type StopCommand
- type TemplateFormat
- type ValidateCommand
- type VersionCommand
Constants ¶
const ( HealthCritical = 2 HealthWarn = 1 HealthPass = 0 HealthUnknown = 3 )
const ( // Names of environment variables used to supply various // config options to the Nomad CLI. EnvNomadAddress = "NOMAD_ADDR" EnvNomadRegion = "NOMAD_REGION" )
const ( // DefaultInitName is the default name we use when // initializing the example file DefaultInitName = "example.nomad" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AgentCheckCommand ¶ added in v0.4.0
type AgentCheckCommand struct {
Meta
}
func (*AgentCheckCommand) Help ¶ added in v0.4.0
func (c *AgentCheckCommand) Help() string
func (*AgentCheckCommand) Run ¶ added in v0.4.0
func (c *AgentCheckCommand) Run(args []string) int
func (*AgentCheckCommand) Synopsis ¶ added in v0.4.0
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 // contains filtered or unexported fields }
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 ClientConfigCommand ¶
type ClientConfigCommand struct {
Meta
}
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 ¶ added in v0.4.1
type DataFormatter interface { // TransformData should return transformed string data. TransformData(interface{}) (string, error) }
DataFormatter is a transformer of the data.
func DataFormat ¶ added in v0.4.1
func DataFormat(format, tmpl string) (DataFormatter, error)
DataFormat returns the data formatter specified format.
type DeploymentCommand ¶ added in v0.6.0
type DeploymentCommand struct {
Meta
}
func (*DeploymentCommand) Help ¶ added in v0.6.0
func (f *DeploymentCommand) Help() string
func (*DeploymentCommand) Run ¶ added in v0.6.0
func (f *DeploymentCommand) Run(args []string) int
func (*DeploymentCommand) Synopsis ¶ added in v0.6.0
func (f *DeploymentCommand) Synopsis() string
type DeploymentFailCommand ¶ added in v0.6.0
type DeploymentFailCommand struct {
Meta
}
func (*DeploymentFailCommand) Help ¶ added in v0.6.0
func (c *DeploymentFailCommand) Help() string
func (*DeploymentFailCommand) Run ¶ added in v0.6.0
func (c *DeploymentFailCommand) Run(args []string) int
func (*DeploymentFailCommand) Synopsis ¶ added in v0.6.0
func (c *DeploymentFailCommand) Synopsis() string
type DeploymentListCommand ¶ added in v0.6.0
type DeploymentListCommand struct {
Meta
}
func (*DeploymentListCommand) Help ¶ added in v0.6.0
func (c *DeploymentListCommand) Help() string
func (*DeploymentListCommand) Run ¶ added in v0.6.0
func (c *DeploymentListCommand) Run(args []string) int
func (*DeploymentListCommand) Synopsis ¶ added in v0.6.0
func (c *DeploymentListCommand) Synopsis() string
type DeploymentPauseCommand ¶ added in v0.6.0
type DeploymentPauseCommand struct {
Meta
}
func (*DeploymentPauseCommand) Help ¶ added in v0.6.0
func (c *DeploymentPauseCommand) Help() string
func (*DeploymentPauseCommand) Run ¶ added in v0.6.0
func (c *DeploymentPauseCommand) Run(args []string) int
func (*DeploymentPauseCommand) Synopsis ¶ added in v0.6.0
func (c *DeploymentPauseCommand) Synopsis() string
type DeploymentPromoteCommand ¶ added in v0.6.0
type DeploymentPromoteCommand struct {
Meta
}
func (*DeploymentPromoteCommand) Help ¶ added in v0.6.0
func (c *DeploymentPromoteCommand) Help() string
func (*DeploymentPromoteCommand) Run ¶ added in v0.6.0
func (c *DeploymentPromoteCommand) Run(args []string) int
func (*DeploymentPromoteCommand) Synopsis ¶ added in v0.6.0
func (c *DeploymentPromoteCommand) Synopsis() string
type DeploymentResumeCommand ¶ added in v0.6.0
type DeploymentResumeCommand struct {
Meta
}
func (*DeploymentResumeCommand) Help ¶ added in v0.6.0
func (c *DeploymentResumeCommand) Help() string
func (*DeploymentResumeCommand) Run ¶ added in v0.6.0
func (c *DeploymentResumeCommand) Run(args []string) int
func (*DeploymentResumeCommand) Synopsis ¶ added in v0.6.0
func (c *DeploymentResumeCommand) Synopsis() string
type DeploymentStatusCommand ¶ added in v0.6.0
type DeploymentStatusCommand struct {
Meta
}
func (*DeploymentStatusCommand) Help ¶ added in v0.6.0
func (c *DeploymentStatusCommand) Help() string
func (*DeploymentStatusCommand) Run ¶ added in v0.6.0
func (c *DeploymentStatusCommand) Run(args []string) int
func (*DeploymentStatusCommand) Synopsis ¶ added in v0.6.0
func (c *DeploymentStatusCommand) Synopsis() string
type EvalStatusCommand ¶ added in v0.4.0
type EvalStatusCommand struct {
Meta
}
func (*EvalStatusCommand) Help ¶ added in v0.4.0
func (c *EvalStatusCommand) Help() string
func (*EvalStatusCommand) Run ¶ added in v0.4.0
func (c *EvalStatusCommand) Run(args []string) int
func (*EvalStatusCommand) Synopsis ¶ added in v0.4.0
func (c *EvalStatusCommand) Synopsis() string
type ExecutorPluginCommand ¶ added in v0.3.0
type ExecutorPluginCommand struct {
Meta
}
func (*ExecutorPluginCommand) Help ¶ added in v0.3.0
func (e *ExecutorPluginCommand) Help() string
func (*ExecutorPluginCommand) Run ¶ added in v0.3.0
func (e *ExecutorPluginCommand) Run(args []string) int
func (*ExecutorPluginCommand) Synopsis ¶ added in v0.3.0
func (e *ExecutorPluginCommand) 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 ¶ added in v0.3.2
type InspectCommand struct {
Meta
}
func (*InspectCommand) Help ¶ added in v0.3.2
func (c *InspectCommand) Help() string
func (*InspectCommand) Run ¶ added in v0.3.2
func (c *InspectCommand) Run(args []string) int
func (*InspectCommand) Synopsis ¶ added in v0.3.2
func (c *InspectCommand) Synopsis() string
type JSONFormat ¶ added in v0.4.1
type JSONFormat struct { }
func (*JSONFormat) TransformData ¶ added in v0.4.1
func (p *JSONFormat) TransformData(data interface{}) (string, error)
TransformData returns JSON format string data.
type JobCommand ¶ added in v0.5.3
type JobCommand struct {
Meta
}
func (*JobCommand) Help ¶ added in v0.5.3
func (f *JobCommand) Help() string
func (*JobCommand) Run ¶ added in v0.5.3
func (f *JobCommand) Run(args []string) int
func (*JobCommand) Synopsis ¶ added in v0.5.3
func (f *JobCommand) Synopsis() string
type JobDeploymentsCommand ¶ added in v0.6.0
type JobDeploymentsCommand struct {
Meta
}
func (*JobDeploymentsCommand) Help ¶ added in v0.6.0
func (c *JobDeploymentsCommand) Help() string
func (*JobDeploymentsCommand) Run ¶ added in v0.6.0
func (c *JobDeploymentsCommand) Run(args []string) int
func (*JobDeploymentsCommand) Synopsis ¶ added in v0.6.0
func (c *JobDeploymentsCommand) Synopsis() string
type JobDispatchCommand ¶ added in v0.5.3
type JobDispatchCommand struct {
Meta
}
func (*JobDispatchCommand) Help ¶ added in v0.5.3
func (c *JobDispatchCommand) Help() string
func (*JobDispatchCommand) Run ¶ added in v0.5.3
func (c *JobDispatchCommand) Run(args []string) int
func (*JobDispatchCommand) Synopsis ¶ added in v0.5.3
func (c *JobDispatchCommand) Synopsis() string
type JobGetter ¶ added in v0.4.1
type JobGetter struct {
// contains filtered or unexported fields
}
type JobHistoryCommand ¶ added in v0.6.0
type JobHistoryCommand struct { Meta // contains filtered or unexported fields }
func (*JobHistoryCommand) Help ¶ added in v0.6.0
func (c *JobHistoryCommand) Help() string
func (*JobHistoryCommand) Run ¶ added in v0.6.0
func (c *JobHistoryCommand) Run(args []string) int
func (*JobHistoryCommand) Synopsis ¶ added in v0.6.0
func (c *JobHistoryCommand) Synopsis() string
type JobRevertCommand ¶ added in v0.6.0
type JobRevertCommand struct {
Meta
}
func (*JobRevertCommand) Help ¶ added in v0.6.0
func (c *JobRevertCommand) Help() string
func (*JobRevertCommand) Run ¶ added in v0.6.0
func (c *JobRevertCommand) Run(args []string) int
func (*JobRevertCommand) Synopsis ¶ added in v0.6.0
func (c *JobRevertCommand) Synopsis() string
type KeygenCommand ¶ added in v0.5.0
type KeygenCommand struct {
Meta
}
KeygenCommand is a Command implementation that generates an encryption key for use in `nomad agent`.
func (*KeygenCommand) Help ¶ added in v0.5.0
func (c *KeygenCommand) Help() string
func (*KeygenCommand) Run ¶ added in v0.5.0
func (c *KeygenCommand) Run(_ []string) int
func (*KeygenCommand) Synopsis ¶ added in v0.5.0
func (c *KeygenCommand) Synopsis() string
type KeyringCommand ¶ added in v0.5.0
type KeyringCommand struct {
Meta
}
KeyringCommand is a Command implementation that handles querying, installing, and removing gossip encryption keys from a keyring.
func (*KeyringCommand) Help ¶ added in v0.5.0
func (c *KeyringCommand) Help() string
func (*KeyringCommand) Run ¶ added in v0.5.0
func (c *KeyringCommand) Run(args []string) int
func (*KeyringCommand) Synopsis ¶ added in v0.5.0
func (c *KeyringCommand) Synopsis() string
type LineLimitReader ¶ added in v0.4.1
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 ¶ added in v0.4.1
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.
type LogsCommand ¶ added in v0.4.1
type LogsCommand struct {
Meta
}
func (*LogsCommand) Help ¶ added in v0.4.1
func (l *LogsCommand) Help() string
func (*LogsCommand) Run ¶ added in v0.4.1
func (l *LogsCommand) Run(args []string) int
func (*LogsCommand) Synopsis ¶ added in v0.4.1
func (l *LogsCommand) Synopsis() string
type Meta ¶
Meta contains the meta-options and functionality that nearly every Nomad command inherits.
func (*Meta) Client ¶
Client is used to initialize and return a new API client using the default command line arguments and env vars.
func (*Meta) Colorize ¶ added in v0.4.0
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 NodeDrainCommand ¶
type NodeDrainCommand struct {
Meta
}
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) 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 ¶ added in v0.5.5
type OperatorCommand struct {
Meta
}
func (*OperatorCommand) Help ¶ added in v0.5.5
func (f *OperatorCommand) Help() string
func (*OperatorCommand) Run ¶ added in v0.5.5
func (f *OperatorCommand) Run(args []string) int
func (*OperatorCommand) Synopsis ¶ added in v0.5.5
func (f *OperatorCommand) Synopsis() string
type OperatorRaftCommand ¶ added in v0.5.5
type OperatorRaftCommand struct {
Meta
}
func (*OperatorRaftCommand) Help ¶ added in v0.5.5
func (c *OperatorRaftCommand) Help() string
func (*OperatorRaftCommand) Run ¶ added in v0.5.5
func (c *OperatorRaftCommand) Run(args []string) int
func (*OperatorRaftCommand) Synopsis ¶ added in v0.5.5
func (c *OperatorRaftCommand) Synopsis() string
type OperatorRaftListCommand ¶ added in v0.5.5
type OperatorRaftListCommand struct {
Meta
}
func (*OperatorRaftListCommand) Help ¶ added in v0.5.5
func (c *OperatorRaftListCommand) Help() string
func (*OperatorRaftListCommand) Run ¶ added in v0.5.5
func (c *OperatorRaftListCommand) Run(args []string) int
func (*OperatorRaftListCommand) Synopsis ¶ added in v0.5.5
func (c *OperatorRaftListCommand) Synopsis() string
type OperatorRaftRemoveCommand ¶ added in v0.5.5
type OperatorRaftRemoveCommand struct {
Meta
}
func (*OperatorRaftRemoveCommand) Help ¶ added in v0.5.5
func (c *OperatorRaftRemoveCommand) Help() string
func (*OperatorRaftRemoveCommand) Run ¶ added in v0.5.5
func (c *OperatorRaftRemoveCommand) Run(args []string) int
func (*OperatorRaftRemoveCommand) Synopsis ¶ added in v0.5.5
func (c *OperatorRaftRemoveCommand) Synopsis() string
type PlanCommand ¶ added in v0.4.0
func (*PlanCommand) Help ¶ added in v0.4.0
func (c *PlanCommand) Help() string
func (*PlanCommand) Run ¶ added in v0.4.0
func (c *PlanCommand) Run(args []string) int
func (*PlanCommand) Synopsis ¶ added in v0.4.0
func (c *PlanCommand) Synopsis() string
type RunCommand ¶
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 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) 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 // contains filtered or unexported fields }
func (*StatusCommand) Help ¶
func (c *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) 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 ¶ added in v0.4.1
type TemplateFormat struct {
// contains filtered or unexported fields
}
func (*TemplateFormat) TransformData ¶ added in v0.4.1
func (p *TemplateFormat) TransformData(data interface{}) (string, error)
TransformData returns template format string data.
type ValidateCommand ¶
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 ¶
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
Source Files ¶
- agent_info.go
- alloc_status.go
- check.go
- client_config.go
- data_format.go
- deployment.go
- deployment_fail.go
- deployment_list.go
- deployment_pause.go
- deployment_promote.go
- deployment_resume.go
- deployment_status.go
- eval_status.go
- executor_plugin.go
- fs.go
- helpers.go
- init.go
- inspect.go
- job.go
- job_deployments.go
- job_dispatch.go
- job_history.go
- job_revert.go
- keygen.go
- keyring.go
- logs.go
- meta.go
- monitor.go
- node_drain.go
- node_status.go
- operator.go
- operator_raft.go
- operator_raft_list.go
- operator_raft_remove.go
- plan.go
- run.go
- server_force_leave.go
- server_join.go
- server_members.go
- status.go
- stop.go
- validate.go
- version.go