{"modulePath":"github.com/stackdocker/consul","version":"v0.5.2","isLatest":true,"isStandardLibrary":false,"goos":"linux","goarch":"amd64","docs":"# package command\n\n## Constants\n\n```go\nconst (\n\t// RPCAddrEnvName defines an environment variable name which sets\n\t// an RPC address if there is no -rpc-addr specified.\n\tRPCAddrEnvName = \"CONSUL_RPC_ADDR\"\n\n\t// HTTPAddrEnvName defines an environment variable name which sets\n\t// the HTTP address if there is no -http-addr specified.\n\tHTTPAddrEnvName = \"CONSUL_HTTP_ADDR\"\n)\n```\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 ConfigTestCommand struct {\n\tUi cli.Ui\n}\n```\nConfigTestCommand is a Command implementation that is used to verify config files\n\n```go\nfunc (c *ConfigTestCommand) Help() string\n```\n\n```go\nfunc (c *ConfigTestCommand) Run(args []string) int\n```\n\n```go\nfunc (c *ConfigTestCommand) Synopsis() string\n```\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 KeyringCommand struct {\n\tUi cli.Ui\n}\n```\nKeyringCommand is a Command implementation that handles querying, installing, and removing gossip encryption keys from a keyring.\n\n```go\nfunc (c *KeyringCommand) Help() string\n```\n\n```go\nfunc (c *KeyringCommand) Run(args []string) int\n```\n\n```go\nfunc (c *KeyringCommand) 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 LockCommand struct {\n\tShutdownCh \u003c-chan struct{}\n\tUi         cli.Ui\n\t// contains filtered or unexported fields\n}\n```\nLockCommand is a Command implementation that is used to setup a \"lock\" which manages lock acquisition and invokes a sub-process\n\n```go\nfunc (c *LockCommand) Help() string\n```\n\n```go\nfunc (c *LockCommand) Run(args []string) int\n```\n\n```go\nfunc (c *LockCommand) Synopsis() string\n```\n\n```go\ntype LockUnlock struct {\n\t// contains filtered or unexported fields\n}\n```\nLockUnlock is used to abstract over the differences between a lock and a semaphore.\n\n```go\ntype MaintCommand struct {\n\tUi cli.Ui\n}\n```\nMaintCommand is a Command implementation that enables or disables node or service maintenance mode.\n\n```go\nfunc (c *MaintCommand) Help() string\n```\n\n```go\nfunc (c *MaintCommand) Run(args []string) int\n```\n\n```go\nfunc (c *MaintCommand) 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/stackdocker/consul/command","name":"command","synopsis":"","isRedistributable":true}
