Liking cljdoc? Tell your friends :D

onyx-http

Onyx plugin for http.

Installation

In your project file:

[org.onyxplatform/onyx-http "0.13.3.0-alpha4"]

In your peer boot-up namespace:

(:require [onyx.plugin.http-output])

Functions

http-output

Catalog entry:

{:onyx/name :entry-name
 :onyx/plugin :onyx.plugin.http-output/output
 :onyx/type :output
 :onyx/medium :http
 :http-output/success-fn :my.namespace/success?
 :http-output/retry-params {:base-sleep-ms 200
                            :max-sleep-ms 30000
                            :max-total-sleep-ms 3600000}
 :onyx/batch-size batch-size
 :onyx/doc "POST segments to http endpoint"}

Segments coming in to your http task are expected in a form such as:

{:url "http://localhost:41300/" :args {:body "a=1" :as :json}

Attributes

keytypedescription
:http-output/success-fnkeywordFunction, which accepts response as an argument, should return boolean to indicate if the response was successful.
:http-output/post-process-fnkeywordFunction, accepts :onyx.core/params, message and response (in that order) to perform any side-effectful action
:http-output/retry-paramsmapIndicates if request should be retried if it's not successful and parameters of retries. Map of three keys: :base-sleep-ms is a delay for a first retry, :max-sleep-ms is a maximum retry delay, and :max-total-sleep-ms is amount of time when request should be not retried anymore.

Acknowledgements

Many thanks to Vsevolod Solovyov for contributing this plugin to Onyx Platform.

Contributing

Pull requests into the master branch are welcomed.

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close