command

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2015 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultInitName is the default name we use when
	// initializing the example file
	DefaultInitName = "example.nomad"
)
View Source
const (
	// Names of environment variables used to supply various
	// config options to the Nomad CLI.
	EnvNomadAddress = "NOMAD_ADDR"
)

Variables

This section is empty.

Functions

This section is empty.

Types

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) 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 DaemonConfig

type DaemonConfig struct {
	exec.Cmd

	// The filepath to write the exit status to.
	ExitStatusFile string

	// The paths, if not /dev/null, must be either in the tasks root directory
	// or in the shared alloc directory.
	StdoutFile string
	StdinFile  string
	StderrFile string

	// An optional path specifying the directory to chroot the process in.
	Chroot string
}

Configuration for the command to start as a daemon.

type EvalMonitorCommand

type EvalMonitorCommand struct {
	Meta
}

func (*EvalMonitorCommand) Help

func (c *EvalMonitorCommand) Help() string

func (*EvalMonitorCommand) Run

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

func (*EvalMonitorCommand) Synopsis

func (c *EvalMonitorCommand) 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 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) 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) 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
}

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 RunCommand

type RunCommand struct {
	Meta
}

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 SpawnDaemonCommand

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

func (*SpawnDaemonCommand) Help

func (c *SpawnDaemonCommand) Help() string

func (*SpawnDaemonCommand) Run

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

func (*SpawnDaemonCommand) Synopsis

func (c *SpawnDaemonCommand) Synopsis() string

type SpawnExitStatus added in v0.2.0

type SpawnExitStatus struct {
	// The exit code of the user's command.
	ExitCode int
}

Exit status of the user's command.

type SpawnStartStatus

type SpawnStartStatus struct {
	// The PID of the user's command.
	UserPID int

	// ErrorMsg will be empty if the user command was started successfully.
	// Otherwise it will have an error message.
	ErrorMsg string
}

Status of executing the user's command.

type StatusCommand

type StatusCommand struct {
	Meta
}

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 TaskStart

type TaskStart bool

Whether to start the user command or abort.

type ValidateCommand

type ValidateCommand struct {
	Meta
}

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 {
	Revision          string
	Version           string
	VersionPrerelease string
	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