-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
31 lines (24 loc) · 841 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
This is an example program to do a pub/sub scenario using etcd watch
Pre-requisites
--------------
etcd
python
etcd client for python
Program Pre-requisites
-----------------------
etcd server version 3.x, installed and running on a host
etcd3 python client library installed
Python Program
---------------
A simple python pub/sub program, which relies on etcd server and uses etcd watch functionality. It requires 'etcd3' python client library installed.
Usage
-----
Subscriber
-----------
python PubSub.py [--host=<etcd_server>] [--port=<etcd_client_port>] subscribe -k <key> [-t <timout_in_seconds>]
Publisher
---------
python PubSub.py [--host=<etcd_server>] [--port=<etcd_client_port>] publish -k <key> -v <value>
Delete
------
python PubSub.py [--host=<etcd_server>] [--port=<etcd_client_port>] delete -k <key>