logs-analyzer/signoz/pkg/query-service/collectorsimulator/inmemoryreceiver/config.go

17 lines
351 B
Go
Raw Permalink Normal View History

2024-09-02 22:47:30 +03:00
package inmemoryreceiver
import "fmt"
type Config struct {
// Unique id for the receiver.
// Useful for getting a hold of the receiver 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 receiver: id is required")
}
return nil
}