oteltest

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

README

oteltest

Documentation

Overview

This file includes the configuration for the module

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() receiver.Factory

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

func (cfg *Config) ValidateConfigMapName() error

ValidateConfigMapName checks if the configmap name is valid.

func (*Config) ValidateInterval

func (cfg *Config) ValidateInterval() error

Validate checks if the receiver configuration is valid

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL