diff options
Diffstat (limited to 'pkg/vpn/bonafide/gateways.go')
-rw-r--r-- | pkg/vpn/bonafide/gateways.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/vpn/bonafide/gateways.go b/pkg/vpn/bonafide/gateways.go index 2d94c63..5474a2f 100644 --- a/pkg/vpn/bonafide/gateways.go +++ b/pkg/vpn/bonafide/gateways.go @@ -34,7 +34,7 @@ type Gateway struct { Protocols []string Options map[string]string Transport string - Fullness float32 + Fullness float64 } /* gatewayDistance is used in the timezone distance fallback */ @@ -96,13 +96,13 @@ func (p *gatewayPool) isValidCity(city string) bool { return valid } -/* returns a map of city: gateway for the ui to use */ -func (p *gatewayPool) pickGatewayForCities(transport string) map[string]Gateway { +/* returns a map of location: fullness for the ui to use */ +func (p *gatewayPool) listLocationFullness(transport string) map[string]float64 { cities := p.getCities() - cm := make(map[string]Gateway) + cm := make(map[string]float64) for _, city := range cities { gw, _ := p.getRandomGatewayByCity(city, transport) - cm[city] = gw + cm[city] = gw.Fullness } return cm } |