Liking cljdoc? Tell your friends :D

puppetlabs.puppetserver.jruby-request


get-environment-from-requestclj

(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.
sourceraw docstring

jruby-timeout?clj

(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.
sourceraw docstring

output-errorclj

(output-error {:keys [uri]} {:keys [msg]} http-status)
source

output-map-errorclj

(output-map-error {:keys [uri]} error http-status)
source

schema-error?clj

(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.
sourceraw docstring

wrap-with-environment-validationclj

(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.
sourceraw docstring

wrap-with-error-handlingclj

(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.
sourceraw docstring

wrap-with-jruby-instanceclj

(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`
sourceraw docstring

wrap-with-request-queue-limitclj

(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.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close