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