Skip to content

Commit

Permalink
Modify args url/listen to include the tcp proto instead of just address
Browse files Browse the repository at this point in the history
The previous default was to use TCP internally but didn't allow the user
to specify the proto for client (url) / server (listen) side endpoint.

Signed-off-by: Joshua Moody <joshua.moody@suse.com>
  • Loading branch information
joshimoo authored and innobead committed May 12, 2022
1 parent e603680 commit 1be3ba5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions app/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ func StartCmd() cli.Command {
Flags: []cli.Flag{
cli.StringFlag{
Name: "listen",
Value: "localhost:8500",
Value: "tcp://localhost:8500",
Usage: "specifies the server endpoint to listen on supported protocols are 'tcp' and 'unix'",
},
cli.StringFlag{
Name: "logs-dir",
Expand Down Expand Up @@ -113,7 +114,7 @@ func start(c *cli.Context) error {
logrus.Info("Creating grpc server with no auth")
}

rpcService, listenAt, err := util.NewServer("tcp://"+listen, tlsConfig,
rpcService, listenAt, err := util.NewServer(listen, tlsConfig,
grpc.KeepaliveEnforcementPolicy(keepalive.EnforcementPolicy{
MinTime: 10 * time.Second,
PermitWithoutStream: true,
Expand Down
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ func main() {
a.Flags = []cli.Flag{
cli.StringFlag{
Name: "url",
Value: "localhost:8500",
Value: "tcp://localhost:8500",
Usage: "specifies the server endpoint to connect to supported protocols are 'tcp' and 'unix'",
},
cli.BoolFlag{
Name: "debug",
Expand Down

0 comments on commit 1be3ba5

Please sign in to comment.