Skip to content

Commit 11d8eca

Browse files
author
Sam Clements
committed
Added documentation on QueuedClient to the README
1 parent 5479c87 commit 11d8eca

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

README.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ As a library::
2828
client.event(service='riemann-client', state='awesome')
2929
client.query("service = 'riemann-client'")
3030

31+
A more detailed example, using both a non-default transport and a queued client::
32+
33+
from riemann_client.transport import TCPTransport
34+
from riemann_client.client import QueuedClient
35+
36+
with QueuedClient(TCPTransport('localhost', 5555)) as client:
37+
client.event(service='one', metric_f=1)
38+
client.event(service='two', metric_f=2)
39+
client.flush()
40+
41+
The ``QueuedClient`` class modifies the ``event()`` method to add events to a queue instead of immediately sending them, and adds the ``flush()`` method to send the current event queue as a single message.
42+
3143
Installation
3244
------------
3345

riemann_client/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"""A Python Riemann client and command line tool"""
22

3-
__version__ = '4.0.0'
3+
__version__ = '4.0.1'
44
__author__ = 'Sam Clements <sam.clements@datasift.com>'

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
setuptools.setup(
66
name='riemann-client',
7-
version='4.0.0',
7+
version='4.0.1',
88

99
author="Sam Clements",
1010
author_email="sam.clements@datasift.com",

0 commit comments

Comments
 (0)