redis-pulse

1.0.1 • Public • Published

Redis Pulse

npm

Simple redis heartbeat. It will send ping command to connection repeatedly while it is open.

Depends on redis npm package as a peer.

Installation

npm i redis-pulse --save

API

Module is just one method, that will get your connection as an argument and return it.

pulse(redisClient, options)

  • redisClient - any redis client (redis.creteClient() result)
  • options
    • timeout - time in ms between pings

Example

Just that simple:

const redis = require('redis');
const pulse = require('redis-pulse');

const client = pulse(redis.createClient());

Readme

Keywords

Package Sidebar

Install

npm i redis-pulse

Weekly Downloads

16

Version

1.0.1

License

MIT

Last publish

Collaborators

  • silent