diplomat 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/diplomat/check.rb +8 -8
- data/lib/diplomat/health.rb +1 -1
- data/lib/diplomat/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3327f89ee1a1649aac458741a7dece72edd9617e
|
4
|
+
data.tar.gz: d6f82af7f86a6ddf2ac9f10e3b7726317f6e6c92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05b006160976a65d944efbf737a49a7177632047dac032d91ee77013dcdd983fe871635bc83daeb956cf6a3d1322c52b37e1862e553269da4b538b038695e658
|
7
|
+
data.tar.gz: 7858da8128b071bd2001310a6ad5331edd229ed37050782f91b8c6903e29f3bce16dc0e0461383bcdc0b74144b745bc8a0377656c601e2dd3b40949b90e6950a
|
data/lib/diplomat/check.rb
CHANGED
@@ -34,8 +34,8 @@ module Diplomat
|
|
34
34
|
req.url "/v1/agent/check/register"
|
35
35
|
req.body = json
|
36
36
|
end
|
37
|
-
|
38
|
-
return
|
37
|
+
|
38
|
+
return ret.status == 200
|
39
39
|
end
|
40
40
|
|
41
41
|
def register_ttl check_id, name, notes, ttl
|
@@ -52,8 +52,8 @@ module Diplomat
|
|
52
52
|
req.url "/v1/agent/check/register"
|
53
53
|
req.body = json
|
54
54
|
end
|
55
|
-
|
56
|
-
return
|
55
|
+
|
56
|
+
return ret.status == 200
|
57
57
|
end
|
58
58
|
|
59
59
|
# Deregister a check
|
@@ -61,7 +61,7 @@ module Diplomat
|
|
61
61
|
# @return [Integer] Status code
|
62
62
|
def deregister check_id
|
63
63
|
ret = @conn.get "/v1/agent/check/deregister/#{check_id}"
|
64
|
-
return
|
64
|
+
return ret.status == 200
|
65
65
|
end
|
66
66
|
|
67
67
|
# Pass a check
|
@@ -69,7 +69,7 @@ module Diplomat
|
|
69
69
|
# @return [Integer] Status code
|
70
70
|
def pass check_id
|
71
71
|
ret = @conn.get "/v1/agent/check/pass/#{check_id}"
|
72
|
-
return
|
72
|
+
return ret.status == 200
|
73
73
|
end
|
74
74
|
|
75
75
|
# Warn a check
|
@@ -77,7 +77,7 @@ module Diplomat
|
|
77
77
|
# @return [Integer] Status code
|
78
78
|
def warn check_id
|
79
79
|
ret = @conn.get "/v1/agent/check/warn/#{check_id}"
|
80
|
-
return
|
80
|
+
return ret.status == 200
|
81
81
|
end
|
82
82
|
|
83
83
|
# Warn a check
|
@@ -85,7 +85,7 @@ module Diplomat
|
|
85
85
|
# @return [Integer] Status code
|
86
86
|
def fail check_id
|
87
87
|
ret = @conn.get "/v1/agent/check/fail/#{check_id}"
|
88
|
-
return
|
88
|
+
return ret.status == 200
|
89
89
|
end
|
90
90
|
|
91
91
|
# @note This is sugar, see (#checks)
|
data/lib/diplomat/health.rb
CHANGED
data/lib/diplomat/version.rb
CHANGED