Updated Notifier Events (markdown)

master
Hunter Long 2020-05-01 05:38:52 -07:00
parent daf594b496
commit fa8f878ef9
1 changed files with 6 additions and 8 deletions

@ -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)
}
```