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
|
```go
|
||||||
// Notifier interface is required to create a new Notifier
|
// Notifier interface is required to create a new Notifier
|
||||||
type Notifier interface {
|
type Notifier interface {
|
||||||
// Run will trigger inside of the notifier when enabled
|
// OnSuccess is triggered when a service is successful
|
||||||
Run() error
|
OnSuccess(*services.Service) error
|
||||||
// OnSave is triggered when the notifier is saved
|
// OnFailure is triggered when a service is failing
|
||||||
OnSave() error
|
OnFailure(*services.Service, *failures.Failure) error
|
||||||
// Test will run a function inside the notifier to Test if it works
|
// OnTest is triggered for testing
|
||||||
Test() error
|
OnTest() (string, error)
|
||||||
// Select returns the *Notification for a notifier
|
|
||||||
Select() *Notification
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue