feat: support ssl on zrpc, simplify the config (#1175)

This commit is contained in:
Kevin Wan
2021-10-30 23:15:39 +08:00
committed by GitHub
parent 9df6786b09
commit c1a8ccda11
4 changed files with 18 additions and 30 deletions

View File

@@ -30,7 +30,6 @@ type (
Token string `json:",optional"`
Retry bool `json:",optional"` // grpc auto retry
Timeout int64 `json:",default=2000"`
InsecureVerify bool `json:",default=false"`
}
)
@@ -73,8 +72,3 @@ func (sc RpcServerConf) Validate() error {
func (cc RpcClientConf) HasCredential() bool {
return len(cc.App) > 0 && len(cc.Token) > 0
}
//HasTls checks if there is a SSL in config.
func (cc RpcClientConf) HasSslVerify() bool {
return cc.InsecureVerify
}