You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/command/rpc.go

19 lines
513 B

package command
import (
"flag"
"github.com/hashicorp/consul/command/agent"
)
// RPCAddrFlag returns a pointer to a string that will be populated
// when the given flagset is parsed with the RPC address of the Consul.
func RPCAddrFlag(f *flag.FlagSet) *string {
return f.String("rpc-addr", "127.0.0.1:8400",
"RPC address of the Consul agent")
}
// RPCClient returns a new Consul RPC client with the given address.
func RPCClient(addr string) (*agent.RPCClient, error) {
return agent.NewRPCClient(addr)
}