rename gateway to endpoint
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
parent
87adb7d366
commit
bde4dba555
9 changed files with 100 additions and 86 deletions
|
@ -53,10 +53,10 @@ var listNodesCommand = cli.Command{
|
|||
}
|
||||
|
||||
w := tabwriter.NewWriter(os.Stdout, 20, 1, 3, ' ', 0)
|
||||
fmt.Fprintf(w, "ID\tADDR\tGATEWAY\tPUBLIC KEY\n")
|
||||
fmt.Fprintf(w, "ID\tADDR\tENDPOINT\tGATEWAY\tPUBLIC KEY\n")
|
||||
for _, n := range nodes {
|
||||
gw := fmt.Sprintf("%s:%d", n.GatewayIP, n.GatewayPort)
|
||||
fmt.Fprintf(w, "%s\t%s\t%s\t%s\n", n.ID, n.Addr, gw, n.KeyPair.PublicKey)
|
||||
ep := fmt.Sprintf("%s:%d", n.EndpointIP, n.EndpointPort)
|
||||
fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\n", n.ID, n.Addr, ep, n.GatewayIP, n.KeyPair.PublicKey)
|
||||
}
|
||||
w.Flush()
|
||||
|
||||
|
|
|
@ -96,16 +96,16 @@ func main() {
|
|||
EnvVar: "HEIMDALL_PEER_NETWORK",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "gateway-ip",
|
||||
Name: "endpoint-ip",
|
||||
Usage: "IP used for peer communication",
|
||||
Value: heimdall.GetIP(),
|
||||
EnvVar: "HEIMDALL_GATEWAY_IP",
|
||||
EnvVar: "HEIMDALL_ENDPOINT_IP",
|
||||
},
|
||||
cli.IntFlag{
|
||||
Name: "gateway-port",
|
||||
Name: "endpoint-port",
|
||||
Usage: "port for peer communication",
|
||||
Value: 10100,
|
||||
EnvVar: "HEIMDALL_GATEWAY_PORT",
|
||||
EnvVar: "HEIMDALL_ENDPOINT_PORT",
|
||||
},
|
||||
}
|
||||
app.Before = func(c *cli.Context) error {
|
||||
|
|
|
@ -47,8 +47,8 @@ func runServer(cx *cli.Context) error {
|
|||
ClusterKey: cx.String("cluster-key"),
|
||||
NodeNetwork: cx.String("node-network"),
|
||||
PeerNetwork: cx.String("peer-network"),
|
||||
GatewayIP: cx.String("gateway-ip"),
|
||||
GatewayPort: cx.Int("gateway-port"),
|
||||
EndpointIP: cx.String("endpoint-ip"),
|
||||
EndpointPort: cx.Int("endpoint-port"),
|
||||
RedisURL: cx.String("redis-url"),
|
||||
AdvertiseRedisURL: cx.String("advertise-redis-url"),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue