chore(publicip): less coupling with ipinfo.io

This commit is contained in:
Quentin McGaw
2024-02-13 11:11:10 +00:00
parent 6a6337b98f
commit cfca026621
14 changed files with 136 additions and 75 deletions

View File

@@ -6,6 +6,7 @@ import (
"github.com/qdm12/gluetun/internal/models"
"github.com/qdm12/gluetun/internal/provider/common"
"github.com/qdm12/gluetun/internal/publicip/api"
)
func setLocationInfo(ctx context.Context, fetcher common.IPFetcher, servers []models.Server) (err error) {
@@ -14,7 +15,7 @@ func setLocationInfo(ctx context.Context, fetcher common.IPFetcher, servers []mo
for _, server := range servers {
ipsToGetInfo = append(ipsToGetInfo, server.IPs...)
}
ipsInfo, err := fetcher.FetchMultiInfo(ctx, ipsToGetInfo)
ipsInfo, err := api.FetchMultiInfo(ctx, fetcher, ipsToGetInfo)
if err != nil {
return err
}