xqueue

Emitter at Redis queue

Usage no npm install needed!

<script type="module">
  import xqueue from 'https://cdn.skypack.dev/xqueue';
</script>

README

xqueue

Emitter at Redis queue

NPM version Build Status Coverage Status

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