ip/resolver/service.go: comments.
This commit is contained in:
parent
4731c01684
commit
200b3172b7
1 changed files with 4 additions and 0 deletions
|
|
@ -8,12 +8,16 @@ import (
|
||||||
"dnsupdater/ip"
|
"dnsupdater/ip"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Interface that IP Lookup Services must implement.
|
||||||
type Service interface {
|
type Service interface {
|
||||||
|
// Get the name of the serivce
|
||||||
Name() string
|
Name() string
|
||||||
|
|
||||||
|
// Lookup the public ip.
|
||||||
Lookup(ctx context.Context) (net.IP, error)
|
Lookup(ctx context.Context) (net.IP, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Constant name for the virtual WAN interface
|
||||||
const WAN_IFACE = "wan"
|
const WAN_IFACE = "wan"
|
||||||
|
|
||||||
func LookupWrapper(service Service) ip.NetInterfaceIPResolver {
|
func LookupWrapper(service Service) ip.NetInterfaceIPResolver {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue