Package command
Overview ▹
Index ▹
type ByMemberName ¶
so we can sort members by name
type ByMemberName []*consulapi.AgentMember
func (ByMemberName) Len ¶
func (m ByMemberName) Len() int
func (ByMemberName) Less ¶
func (m ByMemberName) Less(i, j int) bool
func (ByMemberName) Swap ¶
func (m ByMemberName) Swap(i, j int)
type ConfigTestCommand ¶
ConfigTestCommand is a Command implementation that is used to verify config files
type ConfigTestCommand struct { base.Command }
func (*ConfigTestCommand) Help ¶
func (c *ConfigTestCommand) Help() string
func (*ConfigTestCommand) Run ¶
func (c *ConfigTestCommand) Run(args []string) int
func (*ConfigTestCommand) Synopsis ¶
func (c *ConfigTestCommand) Synopsis() string
type EventCommand ¶
EventCommand is a Command implementation that is used to fire new events
type EventCommand struct { base.Command }
func (*EventCommand) Help ¶
func (c *EventCommand) Help() string
func (*EventCommand) Run ¶
func (c *EventCommand) Run(args []string) int
func (*EventCommand) Synopsis ¶
func (c *EventCommand) Synopsis() string
type ExecCommand ¶
ExecCommand is a Command implementation that is used to do remote execution of commands
type ExecCommand struct {
base.Command
ShutdownCh <-chan struct{}
// contains filtered or unexported fields
}
func (*ExecCommand) Help ¶
func (c *ExecCommand) Help() string
func (*ExecCommand) Run ¶
func (c *ExecCommand) Run(args []string) int
func (*ExecCommand) Synopsis ¶
func (c *ExecCommand) Synopsis() string
type ForceLeaveCommand ¶
ForceLeaveCommand is a Command implementation that tells a running Consul to force a member to enter the "left" state.
type ForceLeaveCommand struct { base.Command }
func (*ForceLeaveCommand) Help ¶
func (c *ForceLeaveCommand) Help() string
func (*ForceLeaveCommand) Run ¶
func (c *ForceLeaveCommand) Run(args []string) int
func (*ForceLeaveCommand) Synopsis ¶
func (c *ForceLeaveCommand) Synopsis() string
type InfoCommand ¶
InfoCommand is a Command implementation that queries a running Consul agent for various debugging statistics for operators
type InfoCommand struct { base.Command }
func (*InfoCommand) Help ¶
func (i *InfoCommand) Help() string
func (*InfoCommand) Run ¶
func (i *InfoCommand) Run(args []string) int
func (*InfoCommand) Synopsis ¶
func (i *InfoCommand) Synopsis() string
type JoinCommand ¶
JoinCommand is a Command implementation that tells a running Consul agent to join another.
type JoinCommand struct { base.Command }
func (*JoinCommand) Help ¶
func (c *JoinCommand) Help() string
func (*JoinCommand) Run ¶
func (c *JoinCommand) Run(args []string) int
func (*JoinCommand) Synopsis ¶
func (c *JoinCommand) Synopsis() string
type KVCommand ¶
KVCommand is a Command implementation that just shows help for the subcommands nested below it.
type KVCommand struct { base.Command }
func (*KVCommand) Help ¶
func (c *KVCommand) Help() string
func (*KVCommand) Run ¶
func (c *KVCommand) Run(args []string) int
func (*KVCommand) Synopsis ¶
func (c *KVCommand) Synopsis() string
type KVDeleteCommand ¶
KVDeleteCommand is a Command implementation that is used to delete a key or prefix of keys from the key-value store.
type KVDeleteCommand struct { base.Command }
func (*KVDeleteCommand) Help ¶
func (c *KVDeleteCommand) Help() string
func (*KVDeleteCommand) Run ¶
func (c *KVDeleteCommand) Run(args []string) int
func (*KVDeleteCommand) Synopsis ¶
func (c *KVDeleteCommand) Synopsis() string
type KVExportCommand ¶
KVExportCommand is a Command implementation that is used to export a KV tree as JSON
type KVExportCommand struct { base.Command }
func (*KVExportCommand) Help ¶
func (c *KVExportCommand) Help() string
func (*KVExportCommand) Run ¶
func (c *KVExportCommand) Run(args []string) int
func (*KVExportCommand) Synopsis ¶
func (c *KVExportCommand) Synopsis() string
type KVGetCommand ¶
KVGetCommand is a Command implementation that is used to fetch the value of a key from the key-value store.
type KVGetCommand struct { base.Command }
func (*KVGetCommand) Help ¶
func (c *KVGetCommand) Help() string
func (*KVGetCommand) Run ¶
func (c *KVGetCommand) Run(args []string) int
func (*KVGetCommand) Synopsis ¶
func (c *KVGetCommand) Synopsis() string
type KVImportCommand ¶
KVImportCommand is a Command implementation that is used to import a KV tree stored as JSON
type KVImportCommand struct {
base.Command
// contains filtered or unexported fields
}
func (*KVImportCommand) Help ¶
func (c *KVImportCommand) Help() string
func (*KVImportCommand) Run ¶
func (c *KVImportCommand) Run(args []string) int
func (*KVImportCommand) Synopsis ¶
func (c *KVImportCommand) Synopsis() string
type KVPutCommand ¶
KVPutCommand is a Command implementation that is used to write data to the key-value store.
type KVPutCommand struct {
base.Command
// contains filtered or unexported fields
}
func (*KVPutCommand) Help ¶
func (c *KVPutCommand) Help() string
func (*KVPutCommand) Run ¶
func (c *KVPutCommand) Run(args []string) int
func (*KVPutCommand) Synopsis ¶
func (c *KVPutCommand) Synopsis() string
type KeygenCommand ¶
KeygenCommand is a Command implementation that generates an encryption key for use in `consul agent`.
type KeygenCommand struct { base.Command }
func (*KeygenCommand) Help ¶
func (c *KeygenCommand) Help() string
func (*KeygenCommand) Run ¶
func (c *KeygenCommand) Run(args []string) int
func (*KeygenCommand) Synopsis ¶
func (c *KeygenCommand) Synopsis() string
type KeyringCommand ¶
KeyringCommand is a Command implementation that handles querying, installing, and removing gossip encryption keys from a keyring.
type KeyringCommand struct { base.Command }
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 LeaveCommand ¶
LeaveCommand is a Command implementation that instructs the Consul agent to gracefully leave the cluster
type LeaveCommand struct { base.Command }
func (*LeaveCommand) Help ¶
func (c *LeaveCommand) Help() string
func (*LeaveCommand) Run ¶
func (c *LeaveCommand) Run(args []string) int
func (*LeaveCommand) Synopsis ¶
func (c *LeaveCommand) Synopsis() string
type LockCommand ¶
LockCommand is a Command implementation that is used to setup a "lock" which manages lock acquisition and invokes a sub-process
type LockCommand struct {
base.Command
ShutdownCh <-chan struct{}
// contains filtered or unexported fields
}
func (*LockCommand) Help ¶
func (c *LockCommand) Help() string
func (*LockCommand) Run ¶
func (c *LockCommand) Run(args []string) int
func (*LockCommand) Synopsis ¶
func (c *LockCommand) Synopsis() string
type LockUnlock ¶
LockUnlock is used to abstract over the differences between a lock and a semaphore.
type LockUnlock struct {
// contains filtered or unexported fields
}
type MaintCommand ¶
MaintCommand is a Command implementation that enables or disables node or service maintenance mode.
type MaintCommand struct { base.Command }
func (*MaintCommand) Help ¶
func (c *MaintCommand) Help() string
func (*MaintCommand) Run ¶
func (c *MaintCommand) Run(args []string) int
func (*MaintCommand) Synopsis ¶
func (c *MaintCommand) Synopsis() string
type MembersCommand ¶
MembersCommand is a Command implementation that queries a running Consul agent what members are part of the cluster currently.
type MembersCommand struct { base.Command }
func (*MembersCommand) Help ¶
func (c *MembersCommand) Help() string
func (*MembersCommand) Run ¶
func (c *MembersCommand) Run(args []string) int
func (*MembersCommand) Synopsis ¶
func (c *MembersCommand) Synopsis() string
type MonitorCommand ¶
MonitorCommand is a Command implementation that queries a running Consul agent what members are part of the cluster currently.
type MonitorCommand struct {
base.Command
ShutdownCh <-chan struct{}
// contains filtered or unexported fields
}
func (*MonitorCommand) Help ¶
func (c *MonitorCommand) Help() string
func (*MonitorCommand) Run ¶
func (c *MonitorCommand) Run(args []string) int
func (*MonitorCommand) Synopsis ¶
func (c *MonitorCommand) Synopsis() string
type OperatorAutopilotCommand ¶
type OperatorAutopilotCommand struct { base.Command }
func (*OperatorAutopilotCommand) Help ¶
func (c *OperatorAutopilotCommand) Help() string
func (*OperatorAutopilotCommand) Run ¶
func (c *OperatorAutopilotCommand) Run(args []string) int
func (*OperatorAutopilotCommand) Synopsis ¶
func (c *OperatorAutopilotCommand) Synopsis() string
type OperatorAutopilotGetCommand ¶
type OperatorAutopilotGetCommand struct { base.Command }
func (*OperatorAutopilotGetCommand) Help ¶
func (c *OperatorAutopilotGetCommand) Help() string
func (*OperatorAutopilotGetCommand) Run ¶
func (c *OperatorAutopilotGetCommand) Run(args []string) int
func (*OperatorAutopilotGetCommand) Synopsis ¶
func (c *OperatorAutopilotGetCommand) Synopsis() string
type OperatorAutopilotSetCommand ¶
type OperatorAutopilotSetCommand struct { base.Command }
func (*OperatorAutopilotSetCommand) Help ¶
func (c *OperatorAutopilotSetCommand) Help() string
func (*OperatorAutopilotSetCommand) Run ¶
func (c *OperatorAutopilotSetCommand) Run(args []string) int
func (*OperatorAutopilotSetCommand) Synopsis ¶
func (c *OperatorAutopilotSetCommand) Synopsis() string
type OperatorCommand ¶
OperatorCommand is used to provide various low-level tools for Consul operators.
type OperatorCommand struct { base.Command }
func (*OperatorCommand) Help ¶
func (c *OperatorCommand) Help() string
func (*OperatorCommand) Run ¶
func (c *OperatorCommand) Run(args []string) int
func (*OperatorCommand) Synopsis ¶
func (c *OperatorCommand) Synopsis() string
Synopsis returns a one-line description of this command.
type OperatorRaftCommand ¶
type OperatorRaftCommand struct { base.Command }
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 { base.Command }
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 { base.Command }
func (*OperatorRaftRemoveCommand) Help ¶
func (c *OperatorRaftRemoveCommand) Help() string
func (*OperatorRaftRemoveCommand) Run ¶
func (c *OperatorRaftRemoveCommand) Run(args []string) int
func (*OperatorRaftRemoveCommand) Synopsis ¶
func (c *OperatorRaftRemoveCommand) Synopsis() string
type RTTCommand ¶
RTTCommand is a Command implementation that allows users to query the estimated round trip time between nodes using network coordinates.
type RTTCommand struct { base.Command }
func (*RTTCommand) Help ¶
func (c *RTTCommand) Help() string
func (*RTTCommand) Run ¶
func (c *RTTCommand) Run(args []string) int
func (*RTTCommand) Synopsis ¶
func (c *RTTCommand) Synopsis() string
type ReloadCommand ¶
ReloadCommand is a Command implementation that instructs the Consul agent to reload configurations
type ReloadCommand struct { base.Command }
func (*ReloadCommand) Help ¶
func (c *ReloadCommand) Help() string
func (*ReloadCommand) Run ¶
func (c *ReloadCommand) Run(args []string) int
func (*ReloadCommand) Synopsis ¶
func (c *ReloadCommand) Synopsis() string
type SnapshotCommand ¶
SnapshotCommand is a Command implementation that just shows help for the subcommands nested below it.
type SnapshotCommand struct { UI cli.Ui }
func (*SnapshotCommand) Help ¶
func (c *SnapshotCommand) Help() string
func (*SnapshotCommand) Run ¶
func (c *SnapshotCommand) Run(args []string) int
func (*SnapshotCommand) Synopsis ¶
func (c *SnapshotCommand) Synopsis() string
type SnapshotInspectCommand ¶
SnapshotInspectCommand is a Command implementation that is used to display metadata about a snapshot file
type SnapshotInspectCommand struct { base.Command }
func (*SnapshotInspectCommand) Help ¶
func (c *SnapshotInspectCommand) Help() string
func (*SnapshotInspectCommand) Run ¶
func (c *SnapshotInspectCommand) Run(args []string) int
func (*SnapshotInspectCommand) Synopsis ¶
func (c *SnapshotInspectCommand) Synopsis() string
type SnapshotRestoreCommand ¶
SnapshotRestoreCommand is a Command implementation that is used to restore the state of the Consul servers for disaster recovery.
type SnapshotRestoreCommand struct { base.Command }
func (*SnapshotRestoreCommand) Help ¶
func (c *SnapshotRestoreCommand) Help() string
func (*SnapshotRestoreCommand) Run ¶
func (c *SnapshotRestoreCommand) Run(args []string) int
func (*SnapshotRestoreCommand) Synopsis ¶
func (c *SnapshotRestoreCommand) Synopsis() string
type SnapshotSaveCommand ¶
SnapshotSaveCommand is a Command implementation that is used to save the state of the Consul servers for disaster recovery.
type SnapshotSaveCommand struct { base.Command }
func (*SnapshotSaveCommand) Help ¶
func (c *SnapshotSaveCommand) Help() string
func (*SnapshotSaveCommand) Run ¶
func (c *SnapshotSaveCommand) Run(args []string) int
func (*SnapshotSaveCommand) Synopsis ¶
func (c *SnapshotSaveCommand) Synopsis() string
type TargetedUI ¶
TargetedUI is a UI that wraps another UI implementation and modifies the output to indicate a specific target. Specifically, all Say output is prefixed with the target name. Message output is not prefixed but is offset by the length of the target so that output is lined up properly with Say output. Machine-readable output has the proper target set.
type TargetedUI struct { Target string UI cli.Ui }
func (*TargetedUI) Ask ¶
func (u *TargetedUI) Ask(query string) (string, error)
func (*TargetedUI) Error ¶
func (u *TargetedUI) Error(message string)
func (*TargetedUI) Info ¶
func (u *TargetedUI) Info(message string)
func (*TargetedUI) Output ¶
func (u *TargetedUI) Output(message string)
type ValidateCommand ¶
ValidateCommand is a Command implementation that is used to verify config files
type ValidateCommand struct { base.Command }
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.
type VersionCommand struct { HumanVersion string UI cli.Ui }
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
type WatchCommand ¶
WatchCommand is a Command implementation that is used to setup a "watch" which uses a sub-process
type WatchCommand struct { base.Command ShutdownCh <-chan struct{} }
func (*WatchCommand) Help ¶
func (c *WatchCommand) Help() string
func (*WatchCommand) Run ¶
func (c *WatchCommand) Run(args []string) int
func (*WatchCommand) Synopsis ¶
func (c *WatchCommand) Synopsis() string