signoz/pkg/gateway/config.go
Vibhu Pandey 5601c0886d
chore(signoz): deprecate all flags (#8308)
Deprecate all flags

- Use querier.config.fluxInterval in lieu of passing `--flux-interval` and `--flux-interval-for-trace-detail`
- Remove `--gateway-url`
- Use telemetrystore.clickhouse.cluster in lieu of passing `--cluster` or `--cluster-name`
- Add an `unparam` check in the linter. Updated some functions across the querier codebase to be compatible with this linter.
- Remove prometheus config from docker builds.
2025-06-21 00:55:38 +05:30

34 lines
530 B
Go

package gateway
import (
"errors"
"net/url"
"github.com/SigNoz/signoz/pkg/factory"
)
type Config struct {
URL *url.URL `mapstructure:"url"`
}
func NewConfigFactory() factory.ConfigFactory {
return factory.NewConfigFactory(factory.MustNewName("gateway"), newConfig)
}
func newConfig() factory.Config {
return &Config{
URL: &url.URL{
Scheme: "http",
Host: "localhost:8080",
Path: "/",
},
}
}
func (c Config) Validate() error {
if c.URL == nil {
return errors.New("url is required")
}
return nil
}