Class: Blodsband::Riak

Inherits:
Object
  • Object
show all
Defined in:
lib/blodsband/riak.rb,
lib/blodsband/riak/mr.rb,
lib/blodsband/riak/map.rb,
lib/blodsband/riak/list.rb,
lib/blodsband/riak/lock.rb,
lib/blodsband/riak/sset.rb,
lib/blodsband/riak/bucket.rb,
lib/blodsband/riak/search.rb,
lib/blodsband/riak/counter.rb,
lib/blodsband/riak/response.rb

Defined Under Namespace

Modules: Response Classes: Bucket, Counter, List, Lock, Map, Mr, Search, Sset

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ Riak

Initialize a Riak client.

Parameters:

  • url (URI)

    a url pointing to the HTML port of a Riak node.



10
11
12
# File 'lib/blodsband/riak.rb', line 10

def initialize(url)
  @url = url
end

Instance Method Details

#bucket(name, options = {}) ⇒ Blodsband::Riak::Bucket

Get a Bucket.

Parameters:

Returns:



22
23
24
# File 'lib/blodsband/riak.rb', line 22

def bucket(name, options = {})
  Bucket.new(@url, name, options)
end

#mrBlodsband::Riak::Mr

Get a map/reduce helper instance.

Returns:



42
43
44
# File 'lib/blodsband/riak.rb', line 42

def mr
  Mr.new(@url)
end

#searchBlodsband::Riak::Search

Get a Search

Parameters:

  • url (URI)

    a url pointing to the HTML port of a Riak node.

Returns:



33
34
35
# File 'lib/blodsband/riak.rb', line 33

def search
  Search.new(@url)
end