bilibili-backup/app/service/ops/log-agent/pkg/lancermonitor/conf.go

21 lines
307 B
Go
Raw Permalink Normal View History

2019-04-22 10:59:20 +08:00
package lancermonitor
import (
"errors"
)
type Config struct {
Addr string `toml:"addr"`
}
func (c *Config) ConfigValidate() (error) {
if c == nil {
return errors.New("config of LancerMonitor is nil")
}
if c.Addr == "" {
return errors.New("addr of LancerMonitor can't be nil")
}
return nil
}