command

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FailsafeCommand added in v0.0.2

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

FailsafeCommand is a command implementation that allows operators to place the daemon in or take the daemon out of failsafe mode.

func (*FailsafeCommand) Help added in v0.0.2

func (c *FailsafeCommand) Help() string

Help provides the help information for the failsafe command.

func (*FailsafeCommand) Run added in v0.0.2

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

Run triggers the failsafe command to update the distributed state tracking data and manipulate the distributed failsafe lock.

func (*FailsafeCommand) Synopsis added in v0.0.2

func (c *FailsafeCommand) Synopsis() string

Synopsis is provides a brief summary of the failsafe command.

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 is set when no flags are present.
	FlagSetNone FlagSetFlags = 0
	// FlagSetClient is our enum.
	FlagSetClient FlagSetFlags = 1 << iota
	// FlagSetDefault is our default flag set.
	FlagSetDefault = FlagSetClient
)

type InitCommand

type InitCommand struct {
	Meta
}

InitCommand is the command implamentation for init.

func (*InitCommand) Help

func (c *InitCommand) Help() string

Help provides the help information for the init command.

func (*InitCommand) Run

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

Run triggers the init command to write the example.json file out to the current directory.

func (*InitCommand) Synopsis

func (c *InitCommand) Synopsis() string

Synopsis is provides a brief summary of the init command.

type Meta

type Meta struct {
	UI cli.Ui
}

Meta contains the meta-options and functionality that Replicator commands can inherit.

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 VersionCommand

type VersionCommand struct {
	Revision          string
	Version           string
	VersionPrerelease string
	UI                cli.Ui
}

VersionCommand is a Command implementation that prints the version.

func (*VersionCommand) Help

func (c *VersionCommand) Help() string

Help provides the help information for the version command.

func (*VersionCommand) Run

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

Run executes the version command.

func (*VersionCommand) Synopsis

func (c *VersionCommand) Synopsis() string

Synopsis is provides a brief summary of the version command.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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