Skip to content

Instantly share code, notes, and snippets.

@coderoshi
Created December 6, 2012 19:21
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 coderoshi/4227447 to your computer and use it in GitHub Desktop.
Save coderoshi/4227447 to your computer and use it in GitHub Desktop.
Riak Ruby Client Usage
client['roflcopter']['key0']
roflcopter = client.bucket("roflcopter")
client = Riak::Client.new(:nodes => [
{ :host => 'TBA' },
{ :host => 'TBA', :pb_port => 1234 },
{ :host => 'TBA', :http_port => 5678 }
])
shiny_new_object = Riak::RObject.new(roflcopter, "riakRock.js")
shiny_new_object.content_type = "application/javascript"
shiny_new_object.raw_data = "document.write('For those about to Riak, we salute you');"
shiny_new_object.store
shiny_new_object.reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment