feature(retry): Delete retry mechanism (#1279)

This commit is contained in:
chenquan
2021-11-27 11:32:33 +08:00
committed by GitHub
parent de5ed6a677
commit cf683411ee
18 changed files with 4 additions and 580 deletions

View File

@@ -14,8 +14,7 @@ type (
ServerOption func(options *rpcServerOptions)
rpcServerOptions struct {
metrics *stat.Metrics
MaxRetries int
metrics *stat.Metrics
}
rpcServer struct {
@@ -56,7 +55,6 @@ func (s *rpcServer) Start(register RegisterFn) error {
unaryInterceptors := []grpc.UnaryServerInterceptor{
serverinterceptors.UnaryTracingInterceptor,
serverinterceptors.RetryInterceptor(s.maxRetries),
serverinterceptors.UnaryCrashInterceptor,
serverinterceptors.UnaryStatInterceptor(s.metrics),
serverinterceptors.UnaryPrometheusInterceptor,
@@ -89,10 +87,3 @@ func WithMetrics(metrics *stat.Metrics) ServerOption {
options.metrics = metrics
}
}
// WithMaxRetries returns a func that sets a max retries to a Server.
func WithMaxRetries(maxRetries int) ServerOption {
return func(options *rpcServerOptions) {
options.MaxRetries = maxRetries
}
}