Documentation ¶
Overview ¶
Resolve host name stuff.
Index ¶
- Constants
- Variables
- func LookupHost(host string) (addrs []string, err error)
- func LookupHostNoCache(host string) (addrs []string, err error)
- func LookupHostWithServers(host string, servers []string, attempts, timeout int) (addrs []string, err error)
- func LookupIp(ip string) (host string, err error)
- func MulticastDNSAllInterfaces() error
- func MulticastDNSResolverConfig(ifs []net.Interface) error
- func Resolve(h string) (out string, err error)
- func ResolveUrl(url *url.URL) (*url.URL, error)
- type Cache
- type Cacher
- type Host
- type Mem
- type Storer
Constants ¶
View Source
const ErrCantResolve = "can't resolve the address"
View Source
const ErrDupEntry = "duplicated entry"
View Source
const ErrHostNotResolved = "host name not resolved"
View Source
const ErrIterStop = "iter stop"
View Source
const ErrNotFound = "entry not found"
View Source
const ErrServFail = "serv fail"
Variables ¶
View Source
var ConfigurationFile = "/etc/resolv.conf"
View Source
var DefaultExpire = 24 * 60 * 60 * time.Second
Time of life of one entry, in seconds. Is query is a hit this time is reseted.
View Source
var DialTimeout = 10 * time.Second
View Source
var ReadTimeout = 500 * time.Millisecond
View Source
var Sleep = 3600 * time.Second
Time between the cleanup of the cache. Old entries are removed. In seconds.
View Source
var Timeout = 5 //Seconds
View Source
var WriteTimeout = 500 * time.Millisecond
Functions ¶
func LookupHost ¶
func LookupHostNoCache ¶
func LookupHostWithServers ¶
func MulticastDNSAllInterfaces ¶
func MulticastDNSAllInterfaces() error
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) PutServFail ¶
type Cacher ¶
type Host ¶
func (*Host) ReturnAddrs ¶
Click to show internal directories.
Click to hide internal directories.