telegraf/plugins/inputs/webhooks/webhooks_models/models.go

17 lines
341 B
Go

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
}