Documentation ¶
Index ¶
Constants ¶
View Source
const StatusDown string = "DOWN"
View Source
const StatusFailed string = "FAILED"
View Source
const StatusTimeout string = "TIMEOUT"
View Source
const StatusUp string = "UP"
View Source
const TelegramNotifierTimeout int = 10
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
func NewDispatcher ¶
func NewDispatcher(db *gorm.DB, logger *logrus.Logger) *Dispatcher
func (*Dispatcher) AddService ¶
func (d *Dispatcher) AddService(serviceID uint)
func (*Dispatcher) RemoveService ¶
func (d *Dispatcher) RemoveService(serviceID uint)
func (*Dispatcher) RestartService ¶
func (d *Dispatcher) RestartService(serviceID uint)
func (*Dispatcher) Start ¶
func (d *Dispatcher) Start()
func (*Dispatcher) Stop ¶
func (d *Dispatcher) Stop()
type HTTPCHecker ¶
type HTTPCHecker struct { URL string Name string AcceptedStatusCode int // contains filtered or unexported fields }
func NewHTTPCHecker ¶
func NewHTTPCHecker(logger *logrus.Logger, name, url string, timeout, acceptedStatusCode int) *HTTPCHecker
func (*HTTPCHecker) Check ¶
func (c *HTTPCHecker) Check() (int, string)
type Monitor ¶
func NewMonitor ¶
type TelegramNotifier ¶
type TelegramNotifier struct {
// contains filtered or unexported fields
}
func NewTelegramNotifier ¶
func NewTelegramNotifier(logger *logrus.Logger, notification *model.Notification) *TelegramNotifier
func (*TelegramNotifier) Notify ¶
func (n *TelegramNotifier) Notify(message string)
Click to show internal directories.
Click to hide internal directories.