feat(publicip/ipinfo): add PUBLICIP_API_TOKEN variable

This commit is contained in:
Quentin McGaw
2024-02-13 10:55:06 +00:00
parent 72b5afc771
commit 6a6337b98f
6 changed files with 29 additions and 4 deletions

View File

@@ -396,7 +396,7 @@ func _main(ctx context.Context, buildInfo models.BuildInformation,
go unboundLooper.RunRestartTicker(dnsTickerCtx, dnsTickerDone)
controlGroupHandler.Add(dnsTickerHandler)
ipFetcher := ipinfo.New(httpClient)
ipFetcher := ipinfo.New(httpClient, *allSettings.PublicIP.APIToken)
publicIPLooper := publicip.NewLoop(ipFetcher,
logger.New(log.SetComponent("ip getter")),
allSettings.PublicIP, puid, pgid)