Documentation ¶
Overview ¶
Package configprovider provides a simple interface to implement configuration providers for action modules and event sources.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterConfigProvider ¶
func RegisterConfigProvider(name string, provider ConfigProviderInterface)
RegisterConfigProvider registers a config provider. Must be called from the init() of the configprovider.
Types ¶
type ConfigProviderInterface ¶
type ConfigProviderInterface interface { GetEventSourceConfig(eventsource string) ([]byte, error) GetActionModuleConfig(actionmodule string) ([]byte, error) Setup(config map[string]interface{}) error }
ConfigProviderInterface is the interface of configuration providers. Setup() is called when CSF starts and can be used to configure the configuration provider. \o/ GetEventSourceConfig() should return the configuration of the given event source and GetActionModuleConfig() should returns the configuration of the given action module.
func GetConfigProvider ¶
func GetConfigProvider(name string) (ConfigProviderInterface, error)
GetConfigProvider returns a configprovider by its name.
Click to show internal directories.
Click to hide internal directories.