hotfix(publicip): return an error if trying to use cloudflare as ip provider for updating servers data

This commit is contained in:
Quentin McGaw
2024-10-11 21:55:03 +00:00
parent a7d70dd9a3
commit 2388e0550b
10 changed files with 50 additions and 2 deletions

View File

@@ -10,8 +10,9 @@ import (
)
var (
ErrNotEnoughServers = errors.New("not enough servers found")
ErrHTTPStatusCodeNotOK = errors.New("HTTP status code not OK")
ErrNotEnoughServers = errors.New("not enough servers found")
ErrHTTPStatusCodeNotOK = errors.New("HTTP status code not OK")
ErrIPFetcherUnsupported = errors.New("IP fetcher not supported")
)
type Fetcher interface {
@@ -33,5 +34,7 @@ type Warner interface {
}
type IPFetcher interface {
String() string
CanFetchAnyIP() bool
FetchInfo(ctx context.Context, ip netip.Addr) (result models.PublicIP, err error)
}