You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
370 B
13 lines
370 B
package configStruct
|
|
|
|
import "fmt"
|
|
|
|
type Otel struct {
|
|
Host string `env:"OTEL_HOST" envDefault:"localhost" configPath:"Otel.Host"`
|
|
Port int `env:"OTEL_PORT" envDefault:"4317" configPath:"Otel.Port"`
|
|
Enable bool `env:"OTEL_ENABLED" envDefault:"True" configPath:"Otel.Enable"`
|
|
}
|
|
|
|
func (o Otel) GetAddr() string {
|
|
return fmt.Sprintf("%s:%d", o.Host, o.Port)
|
|
}
|
|
|