added flag to add custom metadata
This commit is contained in:
@@ -273,5 +273,14 @@ var CliAction = func(ctx *cli.Context) error {
|
||||
}
|
||||
}
|
||||
|
||||
if AddMetaData != "" {
|
||||
err := clientIPTable.AddCustomInformationToIPTable(AddMetaData)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
} else {
|
||||
fmt.Println("Success")
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ var (
|
||||
//--------------------------------
|
||||
PullPlugin string
|
||||
RemovePlugin string
|
||||
AddMetaData string
|
||||
)
|
||||
|
||||
var AppConfigFlags = []cli.Flag{
|
||||
@@ -241,4 +242,11 @@ var AppConfigFlags = []cli.Flag{
|
||||
EnvVars: []string{"REMOVEPLUGIN"},
|
||||
Destination: &RemovePlugin,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "AddMetaData",
|
||||
Aliases: []string{"amd"},
|
||||
Usage: "Adds metadata about the current node in the p2p network which is then propagated through the network",
|
||||
EnvVars: []string{"ADDMETADATA"},
|
||||
Destination: &AddMetaData,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user