Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eknkc/memcached-protocol
Fast memcached binary protocol implementation for Node.JS with binary packet reader / writer and corresponding streams2 stream interfaces.
https://github.com/eknkc/memcached-protocol
Last synced: 9 days ago
JSON representation
Fast memcached binary protocol implementation for Node.JS with binary packet reader / writer and corresponding streams2 stream interfaces.
- Host: GitHub
- URL: https://github.com/eknkc/memcached-protocol
- Owner: eknkc
- Created: 2014-12-06T17:12:08.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-07T12:47:11.000Z (about 10 years ago)
- Last Synced: 2024-12-17T01:34:13.410Z (17 days ago)
- Language: JavaScript
- Size: 145 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```js
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