Skip to content

Instantly share code, notes, and snippets.

@tailhook
Created December 12, 2010 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tailhook/738414 to your computer and use it in GitHub Desktop.
Save tailhook/738414 to your computer and use it in GitHub Desktop.
Route:
limits: &limits
method: !Array
element: !String ""
max-body-size: !Int
min: 0
default: 65536 # 64k
responses: &responses
default: !Struct StaticResponse
maintainance: !Struct StaticResponse
not-found: !Struct StaticResponse
method-not-allowed: !Struct StaticResponse
internal-error: !Struct StaticResponse
service-unavailable: !Struct StaticResponse
gateway-timeout: !Struct StaticResponse
# Dumb maintainance page response
maintainance: !Int 0 #fixme: make bool
# Static response
static:
root: !Dir
check-existence: yes
description: >
Document root for static files
alias: !Dir
check-existence: yes
description: >
Alias dir for static files, it overrides document root. Matched
url prefix (if any) is removed, before appending path to the alias dir
follow-symlinks: !Int 0 #fixme: make bool
deny-suffixes: !Array
element: !String ~
deny-prefixes: !Array
element: !String ~
cache-age: !Int
default: -1
min: 0
max: 31622400
description: >
Sets `Cache-Control: max-age=NUM` and `Expires` headers with
appropriate date. If you want more precise control of what's going on
set this value to -1 and .
# zeromq forwarding
forward:
socket: !Struct zmqsocket
contents: !Array
element: !Struct RequestField
timeout: !Int
min: 0
default: 0
description: >
Max number of seconds request can be served, before retrying or
sending `gateway-timeout` error
retry: !Struct retrymode
# websocket forwarding
# does not collide with everything else
websock:
subscribe: !Struct zmqsocket
forward: !Struct zmqsocket
heartbeat-interval: !UInt
default: 5
max: 86400
description: >
Server will send `heartbeat` messages at this interval. This is
intended to detect gateway crashes
topic-hash-size: !Int
min: 4
max: 1073741824
default: 4096
description: >
Size of hash table for topics. Keep it about twice of average
number of topics. It's not the limit of their number, but limits
performance (collisions are stored in a linked list)
_heartbeat-timer: !CStruct ev_timer
_websock-topics: !_VoidPtr ~
# Children routes
match: !Array
element: !String ~
routing: !Struct RoutingType
routing-by: !Struct RequestField
map: !Mapping
key-element: !String ""
value-element: !Struct Route
children: !Array
element: !Struct Route
_child-match: !_VoidPtr ~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment