Skip to content

Commit

Permalink
use new goliath-chimp metrics classes
Browse files Browse the repository at this point in the history
  • Loading branch information
kornypoet committed Feb 15, 2014
1 parent e76aee7 commit 15b5eaf
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/vayacondios/server/api.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'vayacondios-server'
require 'vayacondios/server/api_options'

module Vayacondios::Server

Expand Down Expand Up @@ -35,16 +34,19 @@ module Vayacondios::Server
# test/development but using a pool of shared connections in
# production mode. The default file is located in the Vayacondios
# source distribution at `config/vcd-server.rb`.
#
#
class Api < Goliath::API
include ApiOptions

plugin Goliath::Chimp::Plugin::ActivityMonitor, window: 30

use Goliath::Rack::Heartbeat
use Goliath::Chimp::Rack::ApiVersion, Vayacondios::GEM_VERSION, api: 'Vayacondios'
use Goliath::Chimp::Rack::Formatters::JSON
use Goliath::Chimp::Rack::ForceContentType, 'application/json'
use Goliath::Rack::Formatters::JSON
use Goliath::Rack::Render
use Goliath::Rack::Params
use Goliath::Chimp::Rack::ApiVersion, Vayacondios::GEM_VERSION, api: 'Vayacondios'
use Goliath::Chimp::Rack::ServerMetrics, env_key: { 'routes' => :type }, default: 'other'
use Goliath::Rack::Validation::RequestMethod, %w[ GET POST PUT PATCH DELETE ]
use Goliath::Chimp::Rack::ControlMethods, 'POST' => :create,
'GET' => :retrieve,
Expand Down

0 comments on commit 15b5eaf

Please sign in to comment.