Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
An EventMachine-based Couchbase ruby driver
Ruby
tree: 707f4b88bf

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
tasks Do not do zipball
.gitignore
.yardopts
Gemfile
HISTORY.markdown
LICENSE
README.markdown
Rakefile
em-couchbase.gemspec

README.markdown

EXAMPLE

Like any Deferrable eventmachine-based protocol implementation, using EM-Couchbase involves making calls and passing blocks that serve as callbacks when the call returns.

require 'em-couchbase'

EM.run do
  couchbase = EM::Protocols::Couchbase.connect
  couchbase.set "a", "foo" do |response|
    if response.success?
      couchbase.get "a" do |response|
        puts response.inspect
      end
    end
  end
  couchbase.incr "bar", :initial => 100500 do |response|
    if response.success?
      couchbase.get "bar" do |response|
        puts response.inspect
        EM.stop
      end
    end
  end
end
Something went wrong with that request. Please try again.