mirror of
https://github.com/hanzoai/o11y.git
synced 2026-10-15 12:58:33 +00:00
Full rebrand of the SigNoz observability platform: - Go module: github.com/SigNoz/signoz → github.com/hanzoai/o11y - Frontend: @signozhq/* → @hanzo/o11y-*, posthog-js → @hanzo/insights - Docker: signoz/* → ghcr.io/hanzoai/o11y* - ClickHouse → Hanzo Datastore (hanzoai/datastore) - Env vars: SIGNOZ_* → HANZO_* - DB tables: signoz_* → o11y_* - All branding, URLs, docs updated - 2172 files changed
35 lines
612 B
Go
35 lines
612 B
Go
package gateway
|
|
|
|
import (
|
|
"net/url"
|
|
|
|
"github.com/hanzoai/o11y/pkg/errors"
|
|
"github.com/hanzoai/o11y/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(errors.TypeInvalidInput, ErrCodeInvalidGatewayConfig, "url is required")
|
|
}
|
|
|
|
return nil
|
|
}
|