support RpcClient Vertify With Unilateralism and Mutual (#647)
Co-authored-by: Kevin Wan <wanjunfeng@gmail.com>
This commit is contained in:
@@ -18,6 +18,12 @@ var (
|
||||
WithRetry = internal.WithRetry
|
||||
// WithUnaryClientInterceptor is an alias of internal.WithUnaryClientInterceptor.
|
||||
WithUnaryClientInterceptor = internal.WithUnaryClientInterceptor
|
||||
// WithInsecure is an alias of internal.WithInsecure.
|
||||
WithInsecure = internal.WithInsecure
|
||||
// WithTlsClientFromUnilateralism is an alias of internal.WithTlsClientFromUnilateralism
|
||||
WithTlsClientFromUnilateralism = internal.WithTlsClientFromUnilateralism
|
||||
// WithTlsClientFromMutual is an alias of internal.WithTlsClientFromMutual
|
||||
WithTlsClientFromMutual = internal.WithTlsClientFromMutual
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -58,6 +64,9 @@ func NewClient(c RpcClientConf, options ...ClientOption) (Client, error) {
|
||||
opts = append(opts, WithRetry())
|
||||
}
|
||||
opts = append(opts, options...)
|
||||
if !c.HasSslVerify() {
|
||||
opts = append(opts, WithInsecure())
|
||||
}
|
||||
|
||||
var target string
|
||||
var err error
|
||||
|
||||
Reference in New Issue
Block a user