mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-03 03:10:40 +08:00

### Summary Add packages for Registry and HTTP #### Related Issues / PR's https://github.com/SigNoz/signoz/pull/5710
28 lines
661 B
Go
28 lines
661 B
Go
package server
|
|
|
|
import (
|
|
"go.signoz.io/signoz/pkg/confmap"
|
|
)
|
|
|
|
// Config satisfies the confmap.Config interface
|
|
var _ confmap.Config = (*Config)(nil)
|
|
|
|
// Config holds the configuration for http.
|
|
type Config struct {
|
|
//Address specifies the TCP address for the server to listen on, in the form "host:port".
|
|
// If empty, ":http" (port 80) is used. The service names are defined in RFC 6335 and assigned by IANA.
|
|
// See net.Dial for details of the address format.
|
|
Address string `mapstructure:"address"`
|
|
}
|
|
|
|
func (c *Config) NewWithDefaults() confmap.Config {
|
|
return &Config{
|
|
Address: "0.0.0.0:8080",
|
|
}
|
|
|
|
}
|
|
|
|
func (c *Config) Validate() error {
|
|
return nil
|
|
}
|