Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTrackerWithExpBackoff ¶
func NewTrackerWithExpBackoff(expBackoffSeconds int) *track.TimeTracker
NewTrackerWithExpBackoff creates TimeTracker with ExpBackoff as Delayer
Types ¶
type Config ¶
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
func NewMonitor ¶
func (*Monitor) RunForSeconds ¶
RunForSeconds runs monitor for runningSeconds seconds or infinitely if 0 is passed as an argument
type MonitorSettings ¶
type MonitorSettings struct { CheckInterval int `json:"checkInterval"` Timeout int `json:"timeout"` MaxConnections int `json:"maxConnections"` ExponentialBackoffSeconds int `json:"exponentialBackoffSeconds"` }
func (*MonitorSettings) Validate ¶
func (ms *MonitorSettings) Validate() error
type NotificationSettings ¶
type NotificationSettings struct { Email []*notify.EmailSettings `json:"email"` Sms []*notify.SmsSettings `json:"sms"` Telegram []*notify.TelegramSettings `json:"telegram"` Pushover []*notify.PushoverSettings `json:"pushover"` Slack []*notify.SlackSettings `json:"slack"` Webhook []*notify.WebhookSettings `json:"webhook"` }
func (*NotificationSettings) GetNotifiers ¶
func (n *NotificationSettings) GetNotifiers() (notifiers notify.Notifiers)
func (*NotificationSettings) Validate ¶
func (ns *NotificationSettings) Validate() error
type Server ¶
type Server struct { Name string `json:"name"` IPAddress string `json:"ipAddress"` Port int `json:"port"` Protocol string `json:"protocol"` CheckInterval int `json:"checkInterval"` Timeout int `json:"timeout"` }
func (*Server) MarshalText ¶
type ServerStatusData ¶
type ServerStatusData struct { ServerStatus map[*Server][]*statusAtTime `json:"serverStatus"` // contains filtered or unexported fields }
func NewServerStatusData ¶
func NewServerStatusData(servers Servers) *ServerStatusData
func (*ServerStatusData) GetServerStatus ¶
func (s *ServerStatusData) GetServerStatus() map[*Server][]*statusAtTime
func (*ServerStatusData) SetStatusAtTimeForServer ¶
func (s *ServerStatusData) SetStatusAtTimeForServer(server *Server, timeNow time.Time, status bool)
SetStatusAtTimeForServer updates map with new entry containing current time and server status at that time
type Settings ¶
type Settings struct { Monitor *MonitorSettings Notifications *NotificationSettings }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.