1
0
Fork 0
telegraf/plugins/secretstores/registry.go

17 lines
458 B
Go
Raw Permalink Normal View History

package secretstores
import (
"github.com/influxdata/telegraf"
)
// Creator is the function to create a new parser
type Creator func(id string) telegraf.SecretStore
// SecretStores contains the registry of all known secret-stores
var SecretStores = make(map[string]Creator)
// Add adds a secret-store to the registry. Usually this function is called in the plugin's init function
func Add(name string, creator Creator) {
SecretStores[name] = creator
}