roshi

0.0.3 • Public • Published

node-roshi

roshi client for node.js

istalling

  npm install roshi

api

  • insert(key, timestamp, value, [callback])
  • delete(key, timestamp, value, [callback])
  • select(key, [offset], [limit], callback) []TimestampValue

usage

first of all you need to build, and start roshi-server

  var roshi = require('roshi');
  
  var port = 6302;
  var host = "127.0.0.1";
  
  // you can pass port and host variables directly to fabric,
  var client = roshi.createClient(port, host);
  
  // or set directly to client instance
  client.port = port;
  client.host = host;
  // btw, that host/port pair are default one
  
  var now = Date.now();
  
  client.insert("myKey", now, "myValue", function(err){
    // ...
  });
  
  
  // 2nd, and 3rd argument of #select may be offset, and limit values,
  // which you can set as default:
  client.offset = 0;
  client.limit  = 1;
  client.select("myKey", function(err, values){
    // values = ["myValue"]
  });
  
  client.delete("myKey", now, "myValue", function(err){
    // ...
  });
  

licence

See LICENSE

Readme

Keywords

none

Package Sidebar

Install

npm i roshi

Weekly Downloads

1

Version

0.0.3

License

MIT

Last publish

Collaborators

  • gamificator