Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DynamicIP ¶
type DynamicIP struct { ips.DynamicIPPort // contains filtered or unexported fields }
DynamicIP is an IP address that gets periodically updated to our public IP
func (*DynamicIP) UpdateExternalIP ¶
func (dynamicIP *DynamicIP) UpdateExternalIP()
Update our public IP address in a loop
type IFConfigResolver ¶
type IFConfigResolver struct {
// contains filtered or unexported fields
}
IFConfigResolves resolves our public IP using ifconfig's format
func (*IFConfigResolver) IsResolver ¶
func (r *IFConfigResolver) IsResolver() bool
type IPManager ¶
type IPManager interface {
Stop()
}
func NewDynamicIPManager ¶
func NewDynamicIPManager(resolver Resolver, updateTimeout time.Duration, log logging.Logger, ip ips.DynamicIPPort) IPManager
Returns a new dynamic IP that resolves and updates [ip] to our public IP every [updateTimeout]. Uses [dynamicResolver] to resolve our public ip. Stops updating when Stop() is called.
type NoDynamicIP ¶
type NoDynamicIP struct{}
func (*NoDynamicIP) Stop ¶
func (noDynamicIP *NoDynamicIP) Stop()
type NoResolver ¶
type NoResolver struct{}
NoResolver doesn't resolve our public IP address
func (*NoResolver) IsResolver ¶
func (r *NoResolver) IsResolver() bool
type OpenDNSResolver ¶
IFConfigResolves resolves our public IP using openDNS
func NewOpenDNSResolver ¶
func NewOpenDNSResolver() *OpenDNSResolver
func (*OpenDNSResolver) IsResolver ¶
func (r *OpenDNSResolver) IsResolver() bool
Click to show internal directories.
Click to hide internal directories.