Documentation ¶
Overview ¶
This file includes the configuration for the module
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFactory ¶
Write a NewFactory function that instantiates your custom factory for your connector(component).
Types ¶
type Config ¶
type Config struct { // The name of the configMap. ConfigMapName string `mapstructure:"config_map_name"` // The interval of the collector. Interval string `mapstructure:"interval"` }
In order to be instantiated and participate in pipelines, the collector needs to identify your connector and properly load its settings from within its configuration file. In order to be able to give your connector access to its settings, create a Config struct. The struct must have an exported field for each of the connector’s settings. The parameter fields added will be accessible from the config.yaml file. Their name in the configuration file is set through a struct tag. Create struct and add parameters. You can optionally add a validator function to check if the given default values are valid for an instance of your connector.
func (*Config) ValidateConfigMapName ¶
ValidateConfigMapName checks if the configmap name is valid.
func (*Config) ValidateInterval ¶
Validate checks if the receiver configuration is valid