0.1.3 • Published 5 years ago

redis-agent v0.1.3

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

@davidahouse/redis-agent

npm (scoped) npm bundle size (minified)

Install

$ npm install --save redis-agent

Usage

const RedisAgent = require('redis-agent')

const conf = {redisHost: '', redisPort: 9999, reidsPassword: null, agentName: '', heartbeatPrefix: '', heartbeatInterval: null}

const agent = new RedisAgent(conf)

Subscribe to receive pub/sub messages

agent.subscribe(['events*'])

Receiving messages

agent.on('message', function(msg) {
  // Called for every message received
})

agent.on('event_123', function(msg) {
  // Or you can have a handler for each message
  // type
})

Sending messages

agent.send('event_123', msg)
0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago