lib/riak/client/http_backend/configuration.rb in riak-client-1.0.0.beta vs lib/riak/client/http_backend/configuration.rb in riak-client-1.0.0
- old
+ new
@@ -130,10 +130,20 @@
else
path(riak_solr_indexer_wm, 'update')
end
end
+ # @return [URI] a URL path for the Luwak interface
+ def luwak_path(key)
+ raise t('luwak_unsupported') unless luwak_wm_file
+ if key
+ path(luwak_wm_file, escape(key))
+ else
+ path(luwak_wm_file)
+ end
+ end
+
private
def server_config
@server_config ||= {}.tap do |hash|
begin
response = get(200, path("/"))
@@ -150,19 +160,19 @@
def riak_kv_wm_buckets
server_config[:riak_kv_wm_buckets]
end
def riak_kv_wm_raw
- server_config[:riak_kv_wm_raw] || client.http_paths[:prefix]
+ server_config[:riak_kv_wm_raw] || node.http_paths[:prefix]
end
def riak_kv_wm_link_walker
- server_config[:riak_kv_wm_link_walker] || client.http_paths[:prefix]
+ server_config[:riak_kv_wm_link_walker] || node.http_paths[:prefix]
end
def riak_kv_wm_mapred
- server_config[:riak_kv_wm_mapred] || client.http_paths[:mapred]
+ server_config[:riak_kv_wm_mapred] || node.http_paths[:mapred]
end
def riak_kv_wm_ping
server_config[:riak_kv_wm_ping] || "/ping"
end
@@ -175,9 +185,13 @@
server_config[:riak_solr_searcher_wm]
end
def riak_solr_indexer_wm
server_config[:riak_solr_indexer_wm]
+ end
+
+ def luwak_wm_file
+ server_config[:luwak_wm_file]
end
end
end
end
end