36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# File 'lib/ruby-kong/request/node.rb', line 36
def self.get_node_status
url = RubyKong::Utils.endpoint_builder(RubyKong.paths[:node][:status])
RubyKong::Stub.request(
:method => :get,
:url => url,
:response => {
:body => {
"server" => {
"connections_handled" => 2757,
"connections_reading" => 0,
"connections_active" => 1,
"connections_waiting" => 0,
"connections_writing" => 1,
"total_requests" => 2757,
"connections_accepted" => 2757
},
"database" => {
"response_ratelimiting_metrics" => 0,
"keyauth_credentials" => 0,
"apis" => 0,
"consumers" => 0,
"plugins" => 0,
"nodes" => 1,
"basicauth_credentials" => 0,
"ratelimiting_metrics" => 0
}
}.to_s
}
)
end
|