Documentation ¶
Index ¶
Constants ¶
View Source
const MessageDown = `🔴 Internet is offline in home %s`
View Source
const MessageUp = `🟢 Internet back online in home %s`
View Source
const (
// ProtocolICMP see in https://godoc.org/golang.org/x/net/internal/iana,
ProtocolICMP = 1
)
Variables ¶
View Source
var ListenAddr = "0.0.0.0"
ListenAddr Default to listen on all IPv4 interfaces
Functions ¶
Types ¶
type InternetStatus ¶
type InternetStatus struct {
// contains filtered or unexported fields
}
func NewInternetStatus ¶
func NewInternetStatus(status bool, err error) InternetStatus
func (InternetStatus) Error ¶
func (s InternetStatus) Error() error
func (InternetStatus) IsUp ¶
func (s InternetStatus) IsUp() bool
func (InternetStatus) MetricValue ¶
func (s InternetStatus) MetricValue() float64
func (InternetStatus) String ¶
func (s InternetStatus) String() string
type InternetStatusMetric ¶
type InternetStatusMetric struct {
// contains filtered or unexported fields
}
func NewInternetStatusMetric ¶
func NewInternetStatusMetric(config config.Home) *InternetStatusMetric
func (*InternetStatusMetric) Run ¶
func (m *InternetStatusMetric) Run()
func (*InternetStatusMetric) Stop ¶
func (m *InternetStatusMetric) Stop()
Click to show internal directories.
Click to hide internal directories.