Skip to content

Instantly share code, notes, and snippets.

@wadey
Created January 4, 2011 01:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wadey/764280 to your computer and use it in GitHub Desktop.
Save wadey/764280 to your computer and use it in GitHub Desktop.
var thrift = require('thrift');
var sys = require('sys');
var scheduler_thrift = require('./gen-nodejs/JobExchange.js'),
scheduler_ttypes = require('./gen-nodejs/scheduler_types.js');
var conn = thrift.createConnection('localhost', 8081),
client = thrift.createClient(scheduler_thrift, conn);
conn.on('error', function(err) {
console.error(err);
conn.destroy();
});
client.get_all(function(err, data) {
console.log(err, data);
conn.end();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment