chore(all): memory and thread safe storage
- settings: get filter choices from storage for settings validation - updater: update servers to the storage - storage: minimal deep copying and data duplication - storage: add merged servers mutex for thread safety - connection: filter servers in storage - formatter: format servers to Markdown in storage - PIA: get server by name from storage directly - Updater: get servers count from storage directly - Updater: equality check done in storage, fix #882
This commit is contained in:
@@ -2,6 +2,7 @@ package privateinternetaccess
|
||||
|
||||
import (
|
||||
"github.com/qdm12/gluetun/internal/configuration/settings"
|
||||
"github.com/qdm12/gluetun/internal/constants/providers"
|
||||
"github.com/qdm12/gluetun/internal/models"
|
||||
"github.com/qdm12/gluetun/internal/provider/privateinternetaccess/presets"
|
||||
"github.com/qdm12/gluetun/internal/provider/utils"
|
||||
@@ -20,5 +21,6 @@ func (p *Provider) GetConnection(selection settings.ServerSelection) (
|
||||
defaults.OpenVPNUDPPort = 1197
|
||||
}
|
||||
|
||||
return utils.GetConnection(p.servers, selection, defaults, p.randSource)
|
||||
return utils.GetConnection(providers.PrivateInternetAccess,
|
||||
p.storage, selection, defaults, p.randSource)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user