Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultCheckInterval = time.Second ConnRe = "Internet connectivity re-established" ConnLost = "Internet connectivity lost" ConnFound = "Internet connectivity found" ConnNotFound = "No internet connectivity" )
DefaultCheckInterval is a const that defines the amount of time between checking if the connection is lost
Variables ¶
View Source
var ( DefaultDNSList = []string{"8.8.8.8", "8.8.4.4", "1.1.1.1", "1.0.0.1"} DefaultDomainList = []string{"www.google.com", "www.cloudflare.com", "www.facebook.com"} )
Default check lists
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker struct { DNSList []string DomainList []string CheckInterval time.Duration sync.Mutex // contains filtered or unexported fields }
Checker defines a struct to determine connectivity to the interwebs
func (*Checker) IsConnected ¶
IsConnected returns if there is internet connectivity
Click to show internal directories.
Click to hide internal directories.