added UpdateIpTableListClient

This commit is contained in:
2021-04-04 21:51:11 +04:00
parent 1c733a694e
commit 2875b7228b
5 changed files with 108 additions and 6 deletions

View File

@@ -15,8 +15,14 @@ var CliAction = func(ctx *cli.Context) error {
//server.Rpc()
}
//Listing servers avaliable
if List_servers {
//Listing servers and also updates IP tables (Default 3 hops)
if ListServers {
err := client.UpdateIpTableListClient()
if err != nil {
fmt.Print(err)
}
p2p.PrintIpTable()
}

View File

@@ -5,7 +5,7 @@ import (
)
var Mode,IpAddress string
var List_servers, Ip_table, Abspath bool
var ListServers, Ip_table, Abspath bool
var AppConfigFlags = []cli.Flag{
// Deprecated to be implemented using GRPC
@@ -20,7 +20,7 @@ var AppConfigFlags = []cli.Flag{
Name: "ListServers",
Usage: "List servers which can render tasks",
EnvVars: []string{"LIST_SERVERS"},
Destination: &List_servers,
Destination: &ListServers,
},
&cli.StringFlag{
Name: "CreateVM",
@@ -31,7 +31,7 @@ var AppConfigFlags = []cli.Flag{
&cli.BoolFlag{
Name: "FilePath",
Usage: "Testing for absolute path",
EnvVars: []string{"CREATE_VM"},
Destination: &Abspath,
},
}