Skip to content

eknkc/memcached-protocol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

memcached-protocol

Fast memcached binary protocol implementation for Node.JS with binary packet reader / writer and corresponding streams2 stream interfaces.

install

npm install memcached-protocol

api

var mp = require('memcached-protocol');

var writer = mp.Writer();
var buffer = writer.write({
  key: 'KEY',
  opcode: "GET|SET|ADD|REPLACE|...",
  value: Buffer|String,
  extras: {
    expiry: Number,
    initial: Number,
    delay: Number,
    flags: Number
  },
  cas: String,
  opaque: Number
})

var reader = mp.Reader();
// returns array of structured memcached packets
var packets = reader.read(buffer)

// reset state
reader.reset();

author

Ekin Koc

license

MIT

About

Fast memcached binary protocol implementation for Node.JS with binary packet reader / writer and corresponding streams2 stream interfaces.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published