RejectResponseBuilder typedef

RejectResponseBuilder = FutureOr<Response> Function(Request request, int retryAfterSeconds)

Builds the response for a request refused by a ConcurrencyLimit.

retryAfterSeconds is ConcurrencyLimit.retryAfterSeconds; when the returned response has no retry-after header, the server adds one with that value.

Implementation

typedef RejectResponseBuilder = FutureOr<Response> Function(
  Request request,
  int retryAfterSeconds,
);