telegraf/plugins/registry.go

16 lines
248 B
Go
Raw Normal View History

package plugins
import "github.com/vektra/cypress"
type Plugin interface {
Read() ([]*cypress.Message, error)
}
type Creator func() Plugin
var Plugins = map[string]Creator{}
func Add(name string, creator Creator) {
Plugins[name] = creator
}