diff --git a/ip/resolver/service.go b/ip/resolver/service.go index 4852363..92aba26 100644 --- a/ip/resolver/service.go +++ b/ip/resolver/service.go @@ -8,12 +8,16 @@ import ( "dnsupdater/ip" ) +// Interface that IP Lookup Services must implement. type Service interface { + // Get the name of the serivce Name() string + // Lookup the public ip. Lookup(ctx context.Context) (net.IP, error) } +// Constant name for the virtual WAN interface const WAN_IFACE = "wan" func LookupWrapper(service Service) ip.NetInterfaceIPResolver {