connections: normalize weights, make config a bit more human-oriented
Current scheme requires people to calculate exact percentages for their nodes. People are bad with pecentage calculations and it's really inconvenient if you have more than 3-4 nodes. What I'd like to have is ability to specify weights like weights, not percentages: .._0_WEIGHT=3 .._1_WEIGHT=1 .._2_WEIGHT=1 and let the gateway calculate things for me.
This commit is contained in:
parent
0d21ca382f
commit
f019c97ce8
3 changed files with 4 additions and 5 deletions
|
@ -183,7 +183,7 @@ func settings() *viper.Viper {
|
|||
fmt.Println()
|
||||
|
||||
fmt.Printf("%s_%s_[N]_ADDRESS = string\n", Prefix, strings.ToUpper(cfgPeers))
|
||||
fmt.Printf("%s_%s_[N]_WEIGHT = 0..1 (float)\n", Prefix, strings.ToUpper(cfgPeers))
|
||||
fmt.Printf("%s_%s_[N]_WEIGHT = float\n", Prefix, strings.ToUpper(cfgPeers))
|
||||
|
||||
os.Exit(0)
|
||||
case version != nil && *version:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue