Class: NATSD::Varz

Inherits:
Object
  • Object
show all
Defined in:
lib/nats/server/varz.rb

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object


4
5
6
7
8
9
# File 'lib/nats/server/varz.rb', line 4

def call(env)
  varz_json = JSON.pretty_generate(Server.update_varz) + "\n"
  hdrs = RACK_JSON_HDR.dup
  hdrs['Content-Length'] = varz_json.bytesize.to_s
  [200, hdrs, varz_json]
end