mirror of https://github.com/statping/statping
Updated Notifier Example (markdown)
parent
c7135fb97e
commit
59f62ddadc
|
@ -1,7 +1,5 @@
|
||||||
Below is a full example of a Statping notifier which will give you a good example of how to create your own. Insert your new notifier inside the `/notifiers` folder once your ready!
|
Below is a full example of a Statping notifier which will give you a good example of how to create your own. Insert your new notifier inside the `/notifiers` folder once your ready!
|
||||||
|
|
||||||
[](https://godoc.org/github.com/hunterlong/statping/core/notifier)
|
|
||||||
|
|
||||||
```go
|
```go
|
||||||
package notifiers
|
package notifiers
|
||||||
|
|
||||||
|
@ -169,4 +167,20 @@ func (n *Example) OnUpdatedNotifier(s *Notification) {
|
||||||
# Adding Notifiers
|
# Adding Notifiers
|
||||||
To add a notifier to the Statping application, simply append your Notifier in the `AttachNotifiers()` function inside of [core/core.go](https://github.com/hunterlong/statping/blob/master/core/core.go).
|
To add a notifier to the Statping application, simply append your Notifier in the `AttachNotifiers()` function inside of [core/core.go](https://github.com/hunterlong/statping/blob/master/core/core.go).
|
||||||
|
|
||||||
https://github.com/hunterlong/statping/blob/master/core/core.go#L183
|
```go
|
||||||
|
// AttachNotifiers will attach all the notifier's into the system
|
||||||
|
func AttachNotifiers() error {
|
||||||
|
return notifier.AddNotifiers(
|
||||||
|
notifiers.Command,
|
||||||
|
notifiers.Discorder,
|
||||||
|
notifiers.Emailer,
|
||||||
|
notifiers.LineNotify,
|
||||||
|
notifiers.Mobile,
|
||||||
|
notifiers.Slacker,
|
||||||
|
notifiers.Telegram,
|
||||||
|
notifiers.Twilio,
|
||||||
|
notifiers.Webhook,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
```
|
||||||
|
###### [AttachNotifiers](https://github.com/hunterlong/statping/blob/master/core/core.go#L183)
|
||||||
|
|
Loading…
Reference in New Issue