1
0
Fork 0
mirror of https://gitlab.com/pnx-tools/dns-updater.git synced 2026-06-16 05:54:56 +02:00

Remove ip/lookup.go as those are not used anymore.

This commit is contained in:
Henrik Hautakoski 2023-12-07 20:41:48 +01:00
parent a6c98a3209
commit 4d1103e133

View file

@ -1,23 +0,0 @@
package ip
import (
"context"
"net"
"time"
"dnsupdater/ip/resolver"
)
// Resolver is a function that gets the ip from a interface name
type NetInterfaceIPResolver func(iface string) (net.IP, error)
func LookupWrapper(service resolver.Service) NetInterfaceIPResolver {
return func(iface_name string) (net.IP, error) {
if iface_name == resolver.WAN_IFACE {
ctx, cancel := context.WithTimeout(context.Background(), time.Second*10)
defer cancel()
return service.Lookup(ctx)
}
return GetInterfaceIP(iface_name)
}
}