resolver.go is library code and should not define (or care) about what is a "WAN" interface or not.
15 lines
247 B
Go
15 lines
247 B
Go
package resolver
|
|
|
|
import (
|
|
"context"
|
|
"net"
|
|
)
|
|
|
|
// 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)
|
|
}
|