mirror of https://github.com/statping/statping
Page:
Notifier Events
Pages
API
AWS EC2
Badges
Build and Test
Bulk Import Services
Cloud Foundry
Commands
Config with .env File
Contributing
Development
Docker Compose
Docker
Environment Variables
Features
GraphQL
Heroku
Home
Issues and Solutions
Linux
Mac Linux Windows
Mac
Makefile
Mobile App
Notifier Events
Notifier Example
Notifiers
PGP Signature
Paid Hosting
Prometheus Exporter
SMTP Emailing
SSL
Sponsor Goal
Static Export
Static HTML Exporter
Terraform
Testing
Types of Monitoring
Windows
config.yml
services.yml
2
Notifier Events
Hunter Long edited this page 2020-05-01 05:38:52 -07:00
Events are handled by added interfaces for the elements you want to monitor.
Required Notifier Interface
// Notifier interface is required to create a new Notifier
type Notifier interface {
// OnSuccess is triggered when a service is successful
OnSuccess(*services.Service) error
// OnFailure is triggered when a service is failing
OnFailure(*services.Service, *failures.Failure) error
// OnTest is triggered for testing
OnTest() (string, error)
}
Basic Success/Failure Interface
// BasicEvents includes the most minimal events, failing and successful service triggers
type BasicEvents interface {
// OnSuccess is triggered when a service is successful
OnSuccess(*types.Service)
// OnFailure is triggered when a service is failing
OnFailure(*types.Service, *types.Failure)
}
Service Events
// ServiceEvents are events for Services
type ServiceEvents interface {
OnNewService(*types.Service)
OnUpdatedService(*types.Service)
OnDeletedService(*types.Service)
}
User Events
// UserEvents are events for Users
type UserEvents interface {
OnNewUser(*types.User)
OnUpdatedUser(*types.User)
OnDeletedUser(*types.User)
}
Core Events
// CoreEvents are events for the main Core app
type CoreEvents interface {
OnUpdatedCore(*types.Core)
}
Notifier Events
// NotifierEvents are events for other Notifiers
type NotifierEvents interface {
OnNewNotifier(*Notification)
OnUpdatedNotifier(*Notification)
}
Overview
Installation
Extras
Contact
Email: info@statping.com
Badges
Statping.com | Demo | Docker | Notifiers | API