- Exported `Fetcher` interface - Inject `Fetcher` to publicip loop and updaters - Get public IP and information at the same time - Only query ipinfo.io - Make `MultiInfo` part of the `Fetch` object
23 lines
539 B
Go
23 lines
539 B
Go
package updater
|
|
|
|
import (
|
|
"github.com/qdm12/gluetun/internal/provider/common"
|
|
)
|
|
|
|
type Updater struct {
|
|
ipFetcher common.IPFetcher
|
|
unzipper common.Unzipper
|
|
parallelResolver common.ParallelResolver
|
|
warner common.Warner
|
|
}
|
|
|
|
func New(ipFetcher common.IPFetcher, unzipper common.Unzipper,
|
|
warner common.Warner, parallelResolver common.ParallelResolver) *Updater {
|
|
return &Updater{
|
|
ipFetcher: ipFetcher,
|
|
unzipper: unzipper,
|
|
parallelResolver: parallelResolver,
|
|
warner: warner,
|
|
}
|
|
}
|