riaps.discd.dbase_redis module

Discovery server database interface Created on Oct 19, 2016

@author: riaps

class riaps.discd.dbase_redis.RedisDbase(context_, dbaseLoc)[source]

Bases: DiscoDbase

Discovery service database implemented using redis

addSub(newKey)[source]

Update the list of subscribed keys with the new key

delSub(key)[source]

Delete subscription to key

detach(key: str, target: str)[source]

Detach update client from keys

fetch(key: str, client: str) [<class 'str'>][source]

Fetch value(s) under key. Add client to list of clients interested in the value

fetchUpdates()[source]

Check and fetch the updated values of the subscribed keys if any

insert(key: str, value: str) [<class 'str'>][source]

Insert value under key and return list of clients of value (if any). A key may have multiple values associated with it, hence the new value is added to the set of values that belong to the key

remove(key: str, value: str) [<class 'str'>][source]

Remove value from values under key.

start()[source]

Start the database: connect to the database process