Persistent server pools (#226)

* GetAllServers with version & timestamp tests
* Storage package to sync servers
* Use storage Sync to get and use servers
This commit is contained in:
Quentin McGaw
2020-08-25 19:38:50 -04:00
committed by GitHub
parent 6fc2b3dd21
commit aa9693a84d
23 changed files with 464 additions and 83 deletions

View File

@@ -14,12 +14,14 @@ import (
)
type pia struct {
random random.Random
random random.Random
servers []models.PIAServer
}
func newPrivateInternetAccess() *pia {
func newPrivateInternetAccess(servers []models.PIAServer) *pia {
return &pia{
random: random.NewRandom(),
random: random.NewRandom(),
servers: servers,
}
}