(get-environment-from-request req)Gets the environment from the URL or query string of a request.
Gets the environment from the URL or query string of a request.
(jruby-timeout? x)Determine if the supplied slingshot message is for a JRuby borrow timeout.
Determine if the supplied slingshot message is for a JRuby borrow timeout.
(schema-error? x)Determine if the supplied slingshot message is for a JRuby borrow timeout.
Determine if the supplied slingshot message is for a JRuby borrow timeout.
(wrap-with-environment-validation handler)(wrap-with-environment-validation handler optional-environment-param)Middleware function which validates the presence and syntactical content of an environment in a ring request. If validation fails, a :bad-request slingshot exception is thrown. If the optional-environment-param is provided as true, it allows for the endpoint to have its query param environment to be optional. However if the param is provided, it will still validate that param for the given request.
Middleware function which validates the presence and syntactical content of an environment in a ring request. If validation fails, a :bad-request slingshot exception is thrown. If the optional-environment-param is provided as true, it allows for the endpoint to have its query param environment to be optional. However if the param is provided, it will still validate that param for the given request.
(wrap-with-error-handling handler)Middleware that wraps a JRuby request with some error handling to return the appropriate http status codes, etc.
Middleware that wraps a JRuby request with some error handling to return the appropriate http status codes, etc.
(wrap-with-jruby-instance handler jruby-service)Middleware fn that borrows a jruby instance from the jruby-service and makes
it available in the request as :jruby-instance
Middleware fn that borrows a jruby instance from the `jruby-service` and makes it available in the request as `:jruby-instance`
(wrap-with-request-queue-limit handler
metrics-service
max-queued-requests
max-retry-delay)Inputs: [handler :- IFn metrics-service :- (schema/protocol jruby-metrics/JRubyMetricsService) max-queued-requests :- schema/Int max-retry-delay :- schema/Int] Returns: IFn
Middleware fn that short-circuits incoming requests with a 503 'Service Unavailable' response if the queue of outstanding requests for JRuby instances exceeds the limit given by the max-queued-requests argument. The response will include a Retry-After header set to a random fraction of the value given by the max-retry-delay argument if set to a positive non-zero number.
Inputs: [handler :- IFn metrics-service :- (schema/protocol jruby-metrics/JRubyMetricsService) max-queued-requests :- schema/Int max-retry-delay :- schema/Int] Returns: IFn Middleware fn that short-circuits incoming requests with a 503 'Service Unavailable' response if the queue of outstanding requests for JRuby instances exceeds the limit given by the max-queued-requests argument. The response will include a Retry-After header set to a random fraction of the value given by the max-retry-delay argument if set to a positive non-zero number.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |