fix issue#10
This commit is contained in:
@ -49,8 +49,8 @@ type LogConfig struct {
|
||||
}
|
||||
|
||||
type ProfilingConfig struct {
|
||||
Addr string `json:"addr"`
|
||||
Enabled bool `json:"enabled"`
|
||||
Addr string `json:"addr"`
|
||||
Enable bool `json:"enable"`
|
||||
}
|
||||
|
||||
type APIConfig struct {
|
||||
@ -61,6 +61,12 @@ type APIConfig struct {
|
||||
Auther string `yaml:",omitempty" json:"auther,omitempty"`
|
||||
}
|
||||
|
||||
type MetricsConfig struct {
|
||||
Enable bool `json:"enable"`
|
||||
Addr string `json:"addr"`
|
||||
Path string `json:"path"`
|
||||
}
|
||||
|
||||
type TLSConfig struct {
|
||||
CertFile string `yaml:"certFile,omitempty" json:"certFile,omitempty"`
|
||||
KeyFile string `yaml:"keyFile,omitempty" json:"keyFile,omitempty"`
|
||||
@ -211,6 +217,7 @@ type Config struct {
|
||||
Log *LogConfig `yaml:",omitempty" json:"log,omitempty"`
|
||||
Profiling *ProfilingConfig `yaml:",omitempty" json:"profiling,omitempty"`
|
||||
API *APIConfig `yaml:",omitempty" json:"api,omitempty"`
|
||||
Metrics *MetricsConfig `yaml:",omitempty" json:"metrics,omitempty"`
|
||||
}
|
||||
|
||||
func (c *Config) Load() error {
|
||||
|
Reference in New Issue
Block a user