mirror of https://github.com/statping/statping
Updated Notifier Events (markdown)
parent
daf594b496
commit
fa8f878ef9
|
@ -4,14 +4,12 @@ Events are handled by added interfaces for the elements you want to monitor.
|
|||
```go
|
||||
// Notifier interface is required to create a new Notifier
|
||||
type Notifier interface {
|
||||
// Run will trigger inside of the notifier when enabled
|
||||
Run() error
|
||||
// OnSave is triggered when the notifier is saved
|
||||
OnSave() error
|
||||
// Test will run a function inside the notifier to Test if it works
|
||||
Test() error
|
||||
// Select returns the *Notification for a notifier
|
||||
Select() *Notification
|
||||
// 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)
|
||||
}
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue