chore(updater): move updater packages to pkg/updaters/<name>

This commit is contained in:
Quentin McGaw
2026-04-23 03:47:57 +00:00
parent 5b01324d5f
commit 13503b0ae0
268 changed files with 1602 additions and 1026 deletions
+4 -4
View File
@@ -9,8 +9,8 @@ import (
"sync"
"github.com/qdm12/gluetun/internal/configuration/settings"
"github.com/qdm12/gluetun/internal/constants/vpn"
"github.com/qdm12/gluetun/internal/models"
"github.com/qdm12/gluetun/pkg/updaters/constants"
)
// ConnectionPicker is a struct that holds the state of the connection pool cycler.
@@ -89,16 +89,16 @@ func pickConnection(connections []models.Connection,
var targetIP netip.Addr
switch selection.VPN {
case vpn.OpenVPN:
case constants.OpenVPN:
targetIP = selection.OpenVPN.EndpointIP
case vpn.Wireguard, vpn.AmneziaWg:
case constants.Wireguard, constants.AmneziaWg:
targetIP = selection.Wireguard.EndpointIP
default:
panic("unknown VPN type: " + selection.VPN)
}
targetIPSet := targetIP.IsValid() && !targetIP.IsUnspecified()
if targetIPSet && selection.VPN == vpn.Wireguard {
if targetIPSet && selection.VPN == constants.Wireguard {
// we need the right public key
return getTargetIPConnection(connections, targetIP)
}