lib/etcd/mod/leader.rb in etcd-0.2.0.alpha vs lib/etcd/mod/leader.rb in etcd-0.2.0.beta.1
- old
+ new
@@ -2,18 +2,18 @@
require 'timeout'
module Etcd
module Mod
+ # Implemetn Etcd's Leader module
module Leader
-
def mod_leader_endpoint
'/mod/v2/leader'
end
def set_leader(key, value, ttl)
path = mod_leader_endpoint + "#{key}?ttl=#{ttl}"
- api_execute(path, :put, params:{name: value}).body
+ api_execute(path, :put, params: { name: value }).body
end
def get_leader(key)
api_execute(mod_leader_endpoint + key, :get).body
end