(build-record m)Builds the REST-proxy record payload (key/value/partition/topic) from the
test-machine message m.
Builds the REST-proxy record payload (key/value/partition/topic) from the test-machine message `m`.
(deliver-ack ack)Deliver the ack promise with the result of attempting to write to kafka. The
default command-handler waits for this before on to the next command so the
test response may indicate the success/failure of each write command.
Deliver the `ack` promise with the result of attempting to write to kafka. The default command-handler waits for this before on to the next command so the test response may indicate the success/failure of each write command.
(destroy-consumer {:keys [base-uri]})Deletes the REST proxy consumer instance at :base-uri.
Deletes the REST proxy consumer instance at `:base-uri`.
(handle-proxy-request method url headers body)Performs an HTTP method request to the REST proxy url with headers and
body, returning a deferred of the parsed response.
Performs an HTTP `method` request to the REST proxy `url` with `headers` and `body`, returning a deferred of the parsed response.
(proxy-client-info client)Returns a small descriptive map for client (its :bootstrap-uri and a stable
hex id) for logging.
Returns a small descriptive map for `client` (its `:bootstrap-uri` and a stable hex id) for logging.
(rest-proxy-client config)Constructs a RestProxyClient from config.
Constructs a RestProxyClient from `config`.
(rest-proxy-consumer config topic-metadata deserializers)Creates an asynchronous Kafka Consumer of all topics defined in the
supplied topic-metadata
Puts all messages on the channel in the returned response. It is the responsibility of the caller to arrange for the read the channel to be read by some other process.
Must be closed with close-consumer when no longer required
Creates an asynchronous Kafka Consumer of all topics defined in the supplied `topic-metadata` Puts all messages on the channel in the returned response. It is the responsibility of the caller to arrange for the read the channel to be read by some other process. Must be closed with `close-consumer` when no longer required
(rest-proxy-headers accept)Returns the Confluent REST proxy HTTP headers: the binary v2 content-type and
the given accept value.
Returns the Confluent REST proxy HTTP headers: the binary v2 content-type and the given `accept` value.
(rest-proxy-poll consumer)Returns a function that takes a consumer and puts any messages retrieved
by polling it onto the supplied messages channel
Returns a function that takes a consumer and puts any messages retrieved by polling it onto the supplied `messages` channel
(rest-proxy-producer config _topics serializers)Creates an asynchronous kafka producer to be used by a test-machine for for injecting test messages
Creates an asynchronous kafka producer to be used by a test-machine for for injecting test messages
(rest-proxy-subscription config topic-metadata)Builds a REST proxy client from config, creates a consumer, and subscribes
it to topic-metadata, returning a deferred of the ready client.
Builds a REST proxy client from `config`, creates a consumer, and subscribes it to `topic-metadata`, returning a deferred of the ready client.
(topic-post {:keys [bootstrap-uri]} msg callback)POSTs msg to the REST proxy's topics/<name> endpoint, invoking callback
with the result.
POSTs `msg` to the REST proxy's `topics/<name>` endpoint, invoking `callback` with the result.
(undatafy-record _topic-metadata m)Converts a datafied record map m back into the plain shape expected when
posting to the Kafka REST proxy.
Converts a datafied record map `m` back into the plain shape expected when posting to the Kafka REST proxy.
(uuid)Returns a random UUID string, used to name REST-proxy consumer instances.
Returns a random UUID string, used to name REST-proxy consumer instances.
(with-consumer {:keys [bootstrap-uri group-id group-config] :as client})Creates a REST proxy consumer instance for client and returns the client
augmented with that consumer's :base-uri.
Creates a REST proxy consumer instance for `client` and returns the client augmented with that consumer's `:base-uri`.
(with-subscription {:keys [base-uri] :as client} topic-metadata)Subscribes the REST proxy client's consumer to the topics in
topic-metadata, returning the client.
Subscribes the REST proxy `client`'s consumer to the topics in `topic-metadata`, returning the client.
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 |