1
0
Fork 0
telegraf/plugins/inputs/registry.go
Daniel Baumann 4978089aab
Adding upstream version 1.34.4.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-05-24 07:26:29 +02:00

14 lines
430 B
Go

package inputs
import "github.com/influxdata/telegraf"
// Creator is a function type that creates a new instance of a telegraf.Input.
type Creator func() telegraf.Input
// Inputs is a map that holds all registered input plugins by their name.
var Inputs = make(map[string]Creator)
// Add registers a new input plugin with the given name and creator function.
func Add(name string, creator Creator) {
Inputs[name] = creator
}