README
xqueue
Emitter at Redis queue
xqueue:emitter:listener:${type}
- emit(type, data)
SMEMBERS xqueue:emitter:listener:${type}
RPUSHX xqueue:emitter:encoding:${type}:${encoding}
SREM xqueue:emitter:encoding:${type}:${encoding}
- on(type, encoding, fn)
RPUSH xqueue:emitter:encoding:${type}:${encoding} :nil
EXPIRE xqueue:emitter:encoding:${type}:${encoding} ${expire}
SADD xqueue:emitter:listener:${type} ${encoding}
while (true) {
LPOP xqueue:emitter:encoding:${type}:${encoding}
sleep()
}
License
MIT © zswang