Created
April 11, 2012 14:44
-
-
Save jbrisbin/2359788 to your computer and use it in GitHub Desktop.
Test file for V8-based riak_core vnodes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var JSON = require("json"); | |
var core = require("riak_core"); | |
(function() { | |
exports.handle_command = function(msg) { | |
return core.reply({ | |
"result": "result value" | |
}); | |
} | |
exports.handle_info = function(msg) { | |
return core.OK; | |
} | |
exports.handle_coverage = function(req, keySpaces) { | |
return core.CONTINUE; | |
} | |
exports.handle_exit = function() { | |
return core.stop("stopping"); | |
} | |
exports.handle_handoff_command = function(msg) { | |
return core.OK; | |
} | |
exports.handoff_starting = function(target) { | |
return true; | |
} | |
exports.handoff_cancelled = function() { | |
return core.OK; | |
} | |
exports.handoff_finished = function(target) { | |
return core.OK; | |
} | |
exports.handle_handoff_data = function(data) { | |
return core.reply(core.OK); | |
} | |
exports.encode_handoff_item = function(name, val) { | |
return JSON.stringify({ | |
"name": name, | |
"value": val | |
}); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment