|
|
@ -58,13 +58,11 @@ func (sc RpcServerConf) HasEtcd() bool {
|
|
|
|
|
|
|
|
|
|
|
|
// Validate validates the config.
|
|
|
|
// Validate validates the config.
|
|
|
|
func (sc RpcServerConf) Validate() error {
|
|
|
|
func (sc RpcServerConf) Validate() error {
|
|
|
|
if sc.Auth {
|
|
|
|
if !sc.Auth {
|
|
|
|
if err := sc.Redis.Validate(); err != nil {
|
|
|
|
return nil
|
|
|
|
return err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return nil
|
|
|
|
return sc.Redis.Validate()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// HasCredential checks if there is a credential in config.
|
|
|
|
// HasCredential checks if there is a credential in config.
|
|
|
|