chore(publicip): refactoring
- 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
This commit is contained in:
@@ -23,6 +23,7 @@ type stateManager interface {
|
||||
SetSettings(ctx context.Context, settings settings.PublicIP) (outcome string)
|
||||
}
|
||||
|
||||
type fetcher interface {
|
||||
FetchPublicIP(ctx context.Context) (ip net.IP, err error)
|
||||
type Fetcher interface {
|
||||
FetchInfo(ctx context.Context, ip net.IP) (
|
||||
result publicipmodels.IPInfoData, err error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user