support RpcClient Vertify With Unilateralism and Mutual (#647)
Co-authored-by: Kevin Wan <wanjunfeng@gmail.com>
This commit is contained in:
@@ -30,6 +30,7 @@ type (
|
||||
Token string `json:",optional"`
|
||||
Retry bool `json:",optional"` // grpc auto retry
|
||||
Timeout int64 `json:",default=2000"`
|
||||
InsecureVerify bool `json:",default=false"`
|
||||
}
|
||||
)
|
||||
|
||||
@@ -72,3 +73,8 @@ 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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user