Add new webhooks plugin that superseed github and rollbar plugins.

Signed-off-by: François de Metz <francois@stormz.me>
Signed-off-by: Cyril Duez <cyril@stormz.me>
This commit is contained in:
François de Metz
2016-05-27 17:27:54 +02:00
parent 8173338f8a
commit 6775719975
16 changed files with 209 additions and 189 deletions

View File

@@ -0,0 +1,16 @@
package webhooks_models
import (
"github.com/gorilla/mux"
"github.com/influxdata/telegraf"
)
type Webhook interface {
Register(router *mux.Router, acc telegraf.Accumulator)
}
var Webhooks map[string]func(string) Webhook = make(map[string]func(string) Webhook)
func Add(name string, fun func(string) Webhook) {
Webhooks[name] = fun
}