mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-17 23:47:12 +00:00
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.
34 lines
530 B
Go
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
|
|
}
|