mirror of
https://github.com/qdm12/gluetun.git
synced 2026-07-27 12:56:24 +02:00
chore(updater): move updater packages to pkg/updaters/<name>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/netip"
|
||||
|
||||
pubipmodels "github.com/qdm12/gluetun/pkg/publicip/models"
|
||||
"github.com/qdm12/gluetun/pkg/updaters/models"
|
||||
"github.com/qdm12/gluetun/pkg/updaters/resolver"
|
||||
)
|
||||
|
||||
type Fetcher interface {
|
||||
FetchServers(ctx context.Context, minServers int) (servers []models.Server, err error)
|
||||
Version() uint16
|
||||
Name() string
|
||||
}
|
||||
|
||||
type ParallelResolver interface {
|
||||
Resolve(ctx context.Context, settings resolver.ParallelSettings) (
|
||||
hostToIPs map[string][]netip.Addr, warnings []string, err error)
|
||||
}
|
||||
|
||||
type Unzipper interface {
|
||||
FetchAndExtract(ctx context.Context, url string) (
|
||||
contents map[string][]byte, err error)
|
||||
}
|
||||
|
||||
type Warner interface {
|
||||
Warn(s string)
|
||||
}
|
||||
|
||||
type IPFetcher interface {
|
||||
String() string
|
||||
CanFetchAnyIP() bool
|
||||
FetchInfo(ctx context.Context, ip netip.Addr) (result pubipmodels.PublicIP, err error)
|
||||
}
|
||||
Reference in New Issue
Block a user