Documentation ¶
Index ¶
- Constants
- func HTTPAddrFlag(f *flag.FlagSet) *string
- func HTTPClient(addr string) (*consulapi.Client, error)
- func HTTPClientConfig(fn func(c *consulapi.Config)) (*consulapi.Client, error)
- func RPCAddrFlag(f *flag.FlagSet) *string
- func RPCClient(addr string) (*agent.RPCClient, error)
- type ByMemberName
- type ConfigTestCommand
- type EventCommand
- type ExecCommand
- type ForceLeaveCommand
- type InfoCommand
- type JoinCommand
- type KeygenCommand
- type KeyringCommand
- type LeaveCommand
- type LockCommand
- type LockUnlock
- type MaintCommand
- type MembersCommand
- type MonitorCommand
- type OperatorCommand
- type RTTCommand
- type ReloadCommand
- type TargetedUi
- type VersionCommand
- type WatchCommand
Constants ¶
const ( // RPCAddrEnvName defines an environment variable name which sets // an RPC address if there is no -rpc-addr specified. RPCAddrEnvName = "CONSUL_RPC_ADDR" // HTTPAddrEnvName defines an environment variable name which sets // the HTTP address if there is no -http-addr specified. HTTPAddrEnvName = "CONSUL_HTTP_ADDR" )
Variables ¶
This section is empty.
Functions ¶
func HTTPAddrFlag ¶ added in v0.4.0
HTTPAddrFlag returns a pointer to a string that will be populated when the given flagset is parsed with the HTTP address of the Consul.
func HTTPClient ¶ added in v0.4.0
HTTPClient returns a new Consul HTTP client with the given address.
func HTTPClientConfig ¶ added in v0.6.0
HTTPClientConfig is used to return a new API client and modify its configuration by passing in a config modifier function.
func RPCAddrFlag ¶
RPCAddrFlag returns a pointer to a string that will be populated when the given flagset is parsed with the RPC address of the Consul.
Types ¶
type ByMemberName ¶ added in v0.6.0
so we can sort members by name
func (ByMemberName) Len ¶ added in v0.6.0
func (m ByMemberName) Len() int
func (ByMemberName) Less ¶ added in v0.6.0
func (m ByMemberName) Less(i, j int) bool
func (ByMemberName) Swap ¶ added in v0.6.0
func (m ByMemberName) Swap(i, j int)
type ConfigTestCommand ¶ added in v0.5.1
ConfigTestCommand is a Command implementation that is used to verify config files
func (*ConfigTestCommand) Help ¶ added in v0.5.1
func (c *ConfigTestCommand) Help() string
func (*ConfigTestCommand) Run ¶ added in v0.5.1
func (c *ConfigTestCommand) Run(args []string) int
func (*ConfigTestCommand) Synopsis ¶ added in v0.5.1
func (c *ConfigTestCommand) Synopsis() string
type EventCommand ¶ added in v0.4.0
EventCommand is a Command implementation that is used to fire new events
func (*EventCommand) Help ¶ added in v0.4.0
func (c *EventCommand) Help() string
func (*EventCommand) Run ¶ added in v0.4.0
func (c *EventCommand) Run(args []string) int
func (*EventCommand) Synopsis ¶ added in v0.4.0
func (c *EventCommand) Synopsis() string
type ExecCommand ¶ added in v0.4.0
type ExecCommand struct { ShutdownCh <-chan struct{} Ui cli.Ui // contains filtered or unexported fields }
ExecCommand is a Command implementation that is used to do remote execution of commands
func (*ExecCommand) Help ¶ added in v0.4.0
func (c *ExecCommand) Help() string
func (*ExecCommand) Run ¶ added in v0.4.0
func (c *ExecCommand) Run(args []string) int
func (*ExecCommand) Synopsis ¶ added in v0.4.0
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.
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
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.
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 KeygenCommand ¶
KeygenCommand is a Command implementation that generates an encryption key for use in `consul 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 ¶ added in v0.5.0
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 LeaveCommand ¶
LeaveCommand is a Command implementation that instructs the Consul agent to gracefully leave the cluster
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 ¶ added in v0.5.0
type LockCommand struct { ShutdownCh <-chan struct{} Ui cli.Ui // contains filtered or unexported fields }
LockCommand is a Command implementation that is used to setup a "lock" which manages lock acquisition and invokes a sub-process
func (*LockCommand) Help ¶ added in v0.5.0
func (c *LockCommand) Help() string
func (*LockCommand) Run ¶ added in v0.5.0
func (c *LockCommand) Run(args []string) int
func (*LockCommand) Synopsis ¶ added in v0.5.0
func (c *LockCommand) Synopsis() string
type LockUnlock ¶ added in v0.5.0
type LockUnlock struct {
// contains filtered or unexported fields
}
LockUnlock is used to abstract over the differences between a lock and a semaphore.
type MaintCommand ¶ added in v0.5.0
MaintCommand is a Command implementation that enables or disables node or service maintenance mode.
func (*MaintCommand) Help ¶ added in v0.5.0
func (c *MaintCommand) Help() string
func (*MaintCommand) Run ¶ added in v0.5.0
func (c *MaintCommand) Run(args []string) int
func (*MaintCommand) Synopsis ¶ added in v0.5.0
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.
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 ¶
type MonitorCommand struct { ShutdownCh <-chan struct{} Ui cli.Ui // contains filtered or unexported fields }
MonitorCommand is a Command implementation that queries a running Consul agent what members are part of the cluster currently.
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 OperatorCommand ¶ added in v0.7.0
OperatorCommand is used to provide various low-level tools for Consul operators.
func (*OperatorCommand) Help ¶ added in v0.7.0
func (c *OperatorCommand) Help() string
func (*OperatorCommand) Run ¶ added in v0.7.0
func (c *OperatorCommand) Run(args []string) int
func (*OperatorCommand) Synopsis ¶ added in v0.7.0
func (c *OperatorCommand) Synopsis() string
Synopsis returns a one-line description of this command.
type RTTCommand ¶ added in v0.6.0
RTTCommand is a Command implementation that allows users to query the estimated round trip time between nodes using network coordinates.
func (*RTTCommand) Help ¶ added in v0.6.0
func (c *RTTCommand) Help() string
func (*RTTCommand) Run ¶ added in v0.6.0
func (c *RTTCommand) Run(args []string) int
func (*RTTCommand) Synopsis ¶ added in v0.6.0
func (c *RTTCommand) Synopsis() string
type ReloadCommand ¶ added in v0.3.0
ReloadCommand is a Command implementation that instructs the Consul agent to reload configurations
func (*ReloadCommand) Help ¶ added in v0.3.0
func (c *ReloadCommand) Help() string
func (*ReloadCommand) Run ¶ added in v0.3.0
func (c *ReloadCommand) Run(args []string) int
func (*ReloadCommand) Synopsis ¶ added in v0.3.0
func (c *ReloadCommand) Synopsis() string
type TargetedUi ¶ added in v0.7.0
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.
func (*TargetedUi) Error ¶ added in v0.7.0
func (u *TargetedUi) Error(message string)
func (*TargetedUi) Info ¶ added in v0.7.0
func (u *TargetedUi) Info(message string)
func (*TargetedUi) Output ¶ added in v0.7.0
func (u *TargetedUi) Output(message 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
type WatchCommand ¶ added in v0.4.0
WatchCommand is a Command implementation that is used to setup a "watch" which uses a sub-process
func (*WatchCommand) Help ¶ added in v0.4.0
func (c *WatchCommand) Help() string
func (*WatchCommand) Run ¶ added in v0.4.0
func (c *WatchCommand) Run(args []string) int
func (*WatchCommand) Synopsis ¶ added in v0.4.0
func (c *WatchCommand) Synopsis() string