consul-client 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -0
- data/consul-client.gemspec +1 -1
- data/lib/consul/client.rb +1 -1
- data/lib/consul/client/service.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80c1c93480e61e527b232543f56a88de8ffa42f9
|
4
|
+
data.tar.gz: abd798f99d22c71b7b382c076dd49d34ad1ecf7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57384907747b902ffb6638288097d6d020f3132e3c6698bb3ab83cc3694488688c282af15f6c233a3e07f5ce8a333191c660b3021c85537baecb69bffc7078df
|
7
|
+
data.tar.gz: da619c7990bd303b3e46af46c9a5bfb7eb02511315bc6300d6dc9248d67991d4d2bc123a021feca54fa5255d617341143fa8ac4b7dee0fabdfb4bc47019adf22
|
data/README.md
CHANGED
@@ -10,6 +10,10 @@ before using for anything real._
|
|
10
10
|
Usage
|
11
11
|
-----
|
12
12
|
|
13
|
+
It's a gem:
|
14
|
+
|
15
|
+
gem install consul-client
|
16
|
+
|
13
17
|
Simple API usage:
|
14
18
|
|
15
19
|
```ruby
|
@@ -27,3 +31,10 @@ See `example` directory for more:
|
|
27
31
|
|
28
32
|
A `Vagrantfile` is provided that makes three
|
29
33
|
Consul nodes, which is handy for playing around.
|
34
|
+
|
35
|
+
Documentation
|
36
|
+
-------------
|
37
|
+
|
38
|
+
[Comprehensive YARD documentation is
|
39
|
+
available](http://rubydoc.info/github/xaviershay/consul-client/master), though
|
40
|
+
honestly you're probably better off just working from the `example` directory.
|
data/consul-client.gemspec
CHANGED
data/lib/consul/client.rb
CHANGED
@@ -54,7 +54,7 @@ module Consul
|
|
54
54
|
# http = Consul::Client.v1.http(logger: Logger.new($stdout))
|
55
55
|
# puts http.get("/get/self")["Member"]["Name"]
|
56
56
|
def http(host: "localhost", port: 8500, logger: NULL_LOGGER)
|
57
|
-
HTTP.new(
|
57
|
+
HTTP.new(host: host, port: port, logger: logger)
|
58
58
|
end
|
59
59
|
end
|
60
60
|
end
|
@@ -22,7 +22,7 @@ module Consul
|
|
22
22
|
# stored at +/kv/web/leader+.
|
23
23
|
def lock(key, &block)
|
24
24
|
session = consul.put("/session/create",
|
25
|
-
LockDelay: '
|
25
|
+
LockDelay: '3s',
|
26
26
|
Checks: ["service:#{name}", "serfHealth"]
|
27
27
|
)["ID"]
|
28
28
|
loop do
|
@@ -43,7 +43,7 @@ module Consul
|
|
43
43
|
end
|
44
44
|
# TODO: Figure out why long poll doesn't work.
|
45
45
|
# https://gist.github.com/xaviershay/30128b968bde0e2d3e0b/edit
|
46
|
-
sleep
|
46
|
+
sleep 3
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: consul-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Xavier Shay
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Ruby client library for Consul HTTP API.
|
14
14
|
email:
|