Add grpc retry (#1160)
* Add grpc retry * Update grpc retry * Add tests * Fix a bug * Add api && some tests * Add comment * Add double check * Add server retry quota * Update optimize code * Fix bug * Update optimize code * Update optimize code * Fix bug
This commit is contained in:
@@ -21,16 +21,18 @@ type (
|
||||
baseRpcServer struct {
|
||||
address string
|
||||
metrics *stat.Metrics
|
||||
maxRetries int
|
||||
options []grpc.ServerOption
|
||||
streamInterceptors []grpc.StreamServerInterceptor
|
||||
unaryInterceptors []grpc.UnaryServerInterceptor
|
||||
}
|
||||
)
|
||||
|
||||
func newBaseRpcServer(address string, metrics *stat.Metrics) *baseRpcServer {
|
||||
func newBaseRpcServer(address string, rpcServerOpts *rpcServerOptions) *baseRpcServer {
|
||||
return &baseRpcServer{
|
||||
address: address,
|
||||
metrics: metrics,
|
||||
address: address,
|
||||
metrics: rpcServerOpts.metrics,
|
||||
maxRetries: rpcServerOpts.MaxRetries,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user