{"modulePath":"github.com/replicatedcom/consul","version":"v0.4.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package command\n\n## Functions\n\n```go\nfunc HTTPAddrFlag(f *flag.FlagSet) *string\n```\nHTTPAddrFlag returns a pointer to a string that will be populated when the given flagset is parsed with the HTTP address of the Consul.\n\n```go\nfunc HTTPClient(addr string) (*consulapi.Client, error)\n```\nHTTPClient returns a new Consul HTTP client with the given address.\n\n```go\nfunc HTTPClientDC(addr, dc string) (*consulapi.Client, error)\n```\nHTTPClientDC returns a new Consul HTTP client with the given address and datacenter\n\n```go\nfunc RPCAddrFlag(f *flag.FlagSet) *string\n```\nRPCAddrFlag returns a pointer to a string that will be populated when the given flagset is parsed with the RPC address of the Consul.\n\n```go\nfunc RPCClient(addr string) (*agent.RPCClient, error)\n```\nRPCClient returns a new Consul RPC client with the given address.\n\n## Types\n\n```go\ntype EventCommand struct {\n\tUi cli.Ui\n}\n```\nEventCommand is a Command implementation that is used to fire new events\n\n```go\nfunc (c *EventCommand) Help() string\n```\n\n```go\nfunc (c *EventCommand) Run(args []string) int\n```\n\n```go\nfunc (c *EventCommand) Synopsis() string\n```\n\n```go\ntype ExecCommand struct {\n\tShutdownCh \u003c-chan struct{}\n\tUi         cli.Ui\n\t// contains filtered or unexported fields\n}\n```\nExecCommand is a Command implementation that is used to do remote execution of commands\n\n```go\nfunc (c *ExecCommand) Help() string\n```\n\n```go\nfunc (c *ExecCommand) Run(args []string) int\n```\n\n```go\nfunc (c *ExecCommand) Synopsis() string\n```\n\n```go\ntype ForceLeaveCommand struct {\n\tUi cli.Ui\n}\n```\nForceLeaveCommand is a Command implementation that tells a running Consul to force a member to enter the \"left\" state.\n\n```go\nfunc (c *ForceLeaveCommand) Help() string\n```\n\n```go\nfunc (c *ForceLeaveCommand) Run(args []string) int\n```\n\n```go\nfunc (c *ForceLeaveCommand) Synopsis() string\n```\n\n```go\ntype InfoCommand struct {\n\tUi cli.Ui\n}\n```\nInfoCommand is a Command implementation that queries a running Consul agent for various debugging statistics for operators\n\n```go\nfunc (i *InfoCommand) Help() string\n```\n\n```go\nfunc (i *InfoCommand) Run(args []string) int\n```\n\n```go\nfunc (i *InfoCommand) Synopsis() string\n```\n\n```go\ntype JoinCommand struct {\n\tUi cli.Ui\n}\n```\nJoinCommand is a Command implementation that tells a running Consul agent to join another.\n\n```go\nfunc (c *JoinCommand) Help() string\n```\n\n```go\nfunc (c *JoinCommand) Run(args []string) int\n```\n\n```go\nfunc (c *JoinCommand) Synopsis() string\n```\n\n```go\ntype KeygenCommand struct {\n\tUi cli.Ui\n}\n```\nKeygenCommand is a Command implementation that generates an encryption key for use in \\`consul agent\\`.\n\n```go\nfunc (c *KeygenCommand) Help() string\n```\n\n```go\nfunc (c *KeygenCommand) Run(_ []string) int\n```\n\n```go\nfunc (c *KeygenCommand) Synopsis() string\n```\n\n```go\ntype LeaveCommand struct {\n\tUi cli.Ui\n}\n```\nLeaveCommand is a Command implementation that instructs the Consul agent to gracefully leave the cluster\n\n```go\nfunc (c *LeaveCommand) Help() string\n```\n\n```go\nfunc (c *LeaveCommand) Run(args []string) int\n```\n\n```go\nfunc (c *LeaveCommand) Synopsis() string\n```\n\n```go\ntype MembersCommand struct {\n\tUi cli.Ui\n}\n```\nMembersCommand is a Command implementation that queries a running Consul agent what members are part of the cluster currently.\n\n```go\nfunc (c *MembersCommand) Help() string\n```\n\n```go\nfunc (c *MembersCommand) Run(args []string) int\n```\n\n```go\nfunc (c *MembersCommand) Synopsis() string\n```\n\n```go\ntype MonitorCommand struct {\n\tShutdownCh \u003c-chan struct{}\n\tUi         cli.Ui\n\t// contains filtered or unexported fields\n}\n```\nMonitorCommand is a Command implementation that queries a running Consul agent what members are part of the cluster currently.\n\n```go\nfunc (c *MonitorCommand) Help() string\n```\n\n```go\nfunc (c *MonitorCommand) Run(args []string) int\n```\n\n```go\nfunc (c *MonitorCommand) Synopsis() string\n```\n\n```go\ntype ReloadCommand struct {\n\tUi cli.Ui\n}\n```\nReloadCommand is a Command implementation that instructs the Consul agent to reload configurations\n\n```go\nfunc (c *ReloadCommand) Help() string\n```\n\n```go\nfunc (c *ReloadCommand) Run(args []string) int\n```\n\n```go\nfunc (c *ReloadCommand) Synopsis() string\n```\n\n```go\ntype TargettedUi struct {\n\tTarget string\n\tUi     cli.Ui\n}\n```\nTargettedUi 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.\n\n```go\nfunc (u *TargettedUi) Ask(query string) (string, error)\n```\n\n```go\nfunc (u *TargettedUi) Error(message string)\n```\n\n```go\nfunc (u *TargettedUi) Info(message string)\n```\n\n```go\nfunc (u *TargettedUi) Output(message string)\n```\n\n```go\ntype VersionCommand struct {\n\tRevision          string\n\tVersion           string\n\tVersionPrerelease string\n\tUi                cli.Ui\n}\n```\nVersionCommand is a Command implementation prints the version.\n\n```go\nfunc (c *VersionCommand) Help() string\n```\n\n```go\nfunc (c *VersionCommand) Run(_ []string) int\n```\n\n```go\nfunc (c *VersionCommand) Synopsis() string\n```\n\n```go\ntype WatchCommand struct {\n\tShutdownCh \u003c-chan struct{}\n\tUi         cli.Ui\n}\n```\nWatchCommand is a Command implementation that is used to setup a \"watch\" which uses a sub-process\n\n```go\nfunc (c *WatchCommand) Help() string\n```\n\n```go\nfunc (c *WatchCommand) Run(args []string) int\n```\n\n```go\nfunc (c *WatchCommand) Synopsis() string\n```\n\n","path":"github.com/replicatedcom/consul/command","name":"command","synopsis":"","isRedistributable":true}
