Sha256: a05c870ccbf3afca84f9e690898e1be560a8851e5a922a5877af0298d295e99c
Contents?: true
Size: 651 Bytes
Versions: 26
Compression:
Stored size: 651 Bytes
Contents
module Cuboid module Rest class Server module Routes module Grid def self.registered( app ) app.get '/grid' do ensure_agent! handle_error do json [Options.agent.url] + agent.statistics['node']['peers'] end end app.get '/grid/:agent' do |url| ensure_agent! handle_error { json connect_to_agent( url ).statistics } end app.delete '/grid/:agent' do |url| ensure_agent! handle_error do unplug_agent( url ) end json nil end end end end end end end
Version data entries
26 entries across 26 versions & 1 rubygems