Skip to content

justinfreitag-zz/node-redis-protocol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-redis-protocol NPM version Build Status Dependency Status

node-redis-protocol is a REdis Serialization Protocol implementation for Node.js.

Usage

// Import
var redisProtocol = require('node-redis-protocol');

// Create request string (supports string arguments only)
var requestString = redisProtocol.createRequestString(arguments);

// Create response parser
var responseParser = new redisProtocol.ResponseParser(options);

// Feed chunked data (as buffer or string)
responseParser.parse(data);

// Parsed response/s are emitted during parse tick
responseParser.on('response', function (response) { ... });

// Fatal error
responseParser.on('error', function (error) { ... });

ResponseParser options

maxBufferLength

  • Type: number // bytes
  • Default: 16777216 // 16MB

Testing

Linting, coverage and complexity checks are handled by gulp-test. Enter gulp from your command line for options.

License

Copyright (c) 2014 Justin Freitag. See the LICENSE file for license rights and limitations (MIT).

About

REdis Serialization Protocol implementation for Node.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published