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

@@ -18,10 +18,8 @@ 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
// WithTlsClientFromUnilateral is an alias of internal.WithTlsClientFromUnilateral
WithTlsClientFromUnilateral = internal.WithTlsClientFromUnilateral
// WithTlsClientFromMutual is an alias of internal.WithTlsClientFromMutual
WithTlsClientFromMutual = internal.WithTlsClientFromMutual
)
@@ -64,9 +62,6 @@ 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