mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-29 16:14:42 +00:00
17 lines
351 B
Go
17 lines
351 B
Go
|
|
package inmemoryexporter
|
||
|
|
|
||
|
|
import "fmt"
|
||
|
|
|
||
|
|
type Config struct {
|
||
|
|
// Unique id for the exporter.
|
||
|
|
// Useful for getting a hold of the exporter in code that doesn't control its instantiation.
|
||
|
|
Id string `mapstructure:"id"`
|
||
|
|
}
|
||
|
|
|
||
|
|
func (c *Config) Validate() error {
|
||
|
|
if len(c.Id) < 1 {
|
||
|
|
return fmt.Errorf("inmemory exporter: id is required")
|
||
|
|
}
|
||
|
|
return nil
|
||
|
|
}
|