WithRateLimiter configures a rate limiter on the server.
(limiter ratelimit.Interface)
| 126 | |
| 127 | // WithRateLimiter configures a rate limiter on the server. |
| 128 | func WithRateLimiter(limiter ratelimit.Interface) Option { |
| 129 | return func(o *options) { |
| 130 | o.limiter = limiter |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | // ErrRPCRecovered is returned when a panic is caught from an RPC. |
| 135 | var ErrRPCRecovered = errors.DefineInternal("rpc_recovered", "Internal Server Error") |