add skip for check exist method && handler for user methods
This commit is contained in:
1 parent
08c4fb9bee
commit
91a14f9f23
14 files changed
+136
-87
No files matched your search
+10
-4
@@ -16,11 +16,12 @@ import (
|
||||
)
|
||||
|
||||
type grpcProxy struct {
|
||||
client *backend.RxGrpcClient
|
||||
skipAuth bool
|
||||
client *backend.RxGrpcClient
|
||||
skipAuth bool
|
||||
skipExistCheck bool
|
||||
}
|
||||
|
||||
func NewProxy(skipAuth bool) *grpcProxy {
|
||||
func NewProxy(skipAuth, skipExistCheck bool) *grpcProxy {
|
||||
return &grpcProxy{
|
||||
client: backend.NewRxGrpcClient(
|
||||
backend.WithDialOptions(
|
||||
@@ -31,7 +32,8 @@ func NewProxy(skipAuth bool) *grpcProxy {
|
||||
backend.WithDialingErrorHandler(func(err error) {
|
||||
log.Errorf(log_code.ErrorClientGrpc, "dialing err: %v", err)
|
||||
})),
|
||||
skipAuth: skipAuth,
|
||||
skipAuth: skipAuth,
|
||||
skipExistCheck: skipExistCheck,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +59,10 @@ func (p *grpcProxy) SkipAuth() bool {
|
||||
return p.skipAuth
|
||||
}
|
||||
|
||||
func (p *grpcProxy) SkipExistCheck() bool {
|
||||
return p.skipExistCheck
|
||||
}
|
||||
|
||||
func (p *grpcProxy) Close() {
|
||||
p.client.Close()
|
||||
}
|
||||
Reference in new issue
Block a user