feature(retry): Delete retry mechanism (#1279)
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user