Network client for connecting to a Riemann server. Usage:
(def c (tcp-client {:host "monitoring.local"}))
(send-event c {:service "fridge" :state "running" :metric 2.0 :tags ["joke"]}) => #<com.riemann.riemann.client.MapPromise ...>
@(query c "tagged "joke"") => [{:service "fridge" ... }]
(close! c)
Clients are resistant to failure; they will attempt to reconnect a dropped connection periodically. Note that clients will not automatically queue or retry failed sends.
Network client for connecting to a Riemann server. Usage: (def c (tcp-client {:host "monitoring.local"})) (send-event c {:service "fridge" :state "running" :metric 2.0 :tags ["joke"]}) => #<com.riemann.riemann.client.MapPromise ...> @(query c "tagged \"joke\"") => [{:service "fridge" ... }] (close! c) Clients are resistant to failure; they will attempt to reconnect a dropped connection periodically. Note that clients will not automatically queue or retry failed sends.
(batch-client client)
(batch-client client n)
Wraps a client in a RiemannBatchClient, with batch size n.
Wraps a client in a RiemannBatchClient, with batch size n.
(close! client)
Close a client or transport, shutting it down.
Close a client or transport, shutting it down.
(connect! t)
Connect a client or transport.
Connect a client or transport.
(connected? t)
Is a client or transport connected?
Is a client or transport connected?
(flush! t)
Flush messages from a client or transport's buffers.
Flush messages from a client or transport's buffers.
(map-promise p f)
Maps a riemann client promise by applying a function.
Maps a riemann client promise by applying a function.
(multi-client clients)
Creates a new multiclient from n clients
Creates a new multiclient from n clients
(query client string)
Query the server for events in the index. Returns a list of events.
Query the server for events in the index. Returns a list of events.
(reconnect! client)
Reconnect a client or transport.
Reconnect a client or transport.
(send-event client event)
Sends a single event, asynchronously, over client. Returns an IDeref which can be resolved to a response message.
Sends a single event, asynchronously, over client. Returns an IDeref which can be resolved to a response message.
(send-events client events)
Sends several events, asynchronously, over client. Returns an IDeref which can be resolved to a response message.
Sends several events, asynchronously, over client. Returns an IDeref which can be resolved to a response message.
(send-exception client service t)
Send an exception, asynchronously, over client. Uses (:name service) as the service. Returns an IDeref which can be resolved to a response message.
Send an exception, asynchronously, over client. Uses (:name service) as the service. Returns an IDeref which can be resolved to a response message.
(send-msg client msg)
Send a message to the server, asynchronously. Returns an IDeref which can be resolved to a response message.
Send a message to the server, asynchronously. Returns an IDeref which can be resolved to a response message.
(tcp-client & opts)
Creates a new TCP client. Options:
:host The host to connect to :port The port to connect to
:tls? Whether to use TLS when connecting :key A PKCS8 key :cert A PEM certificate :ca-cert The signing cert for our certificate and the server's :auto-connect Whether to call 'connect!' prior to returning the client
Example:
(tcp-client) (tcp-client {:host "foo" :port 5555})
Creates a new TCP client. Options: :host The host to connect to :port The port to connect to :tls? Whether to use TLS when connecting :key A PKCS8 key :cert A PEM certificate :ca-cert The signing cert for our certificate and the server's :auto-connect Whether to call 'connect!' prior to returning the client Example: (tcp-client) (tcp-client {:host "foo" :port 5555})
(transport t)
Get an underlying transport from a client or transport.
Get an underlying transport from a client or transport.
(udp-client & opts)
Creates a new UDP client. Can take an optional maximum message size. Example: (udp-client) (udp-client {:host "foo" :port 5555 :max-size 16384})
Creates a new UDP client. Can take an optional maximum message size. Example: (udp-client) (udp-client {:host "foo" :port 5555 :max-size 16384})
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close