Module serverino.config
Configuration module for serverino.
Structs
Name | Description |
priority
|
UDA. Set @endpoint priority
|
route
|
UDA. You can use to filter requests using a function bool(Request request) { }
|
ServerinoConfig
|
Struct used to setup serverino.
You must return this struct from a function with @onServerInit UDA attached.
|
Enums
Name | Description |
endpoint
|
UDA. Functions with @endpoint attached are called when a request is received
|
Fallthrough
|
Used as optional return type for functions with @endpoint ` UDA attached.
It is used to override the default behavior of serverino: if an endpoint returns Fallthrough.Yes, the next endpoint is called even if the current one has written to the output.
|
onDaemonStart
|
UDA. Called when daemon start. Running in main thread, not in worker.
|
onDaemonStop
|
UDA. Called when daemon exit. Running in main thread, not in worker.
|
onServerInit
|
UDA. Used to setup serverino. Must return a ServerinoConfig struct. See ServerinoConfig struct.
|
onWebSocketStart
|
UDA. Functions with @onWebSocketStart attached are called when a websocket is started
|
onWebSocketStop
|
UDA. Functions with @onWebSocketStop attached are called when a websocket is stopped
|
onWebSocketUpgrade
|
UDA. Functions with @onWebSocketUpgrade attached are called when a websocket upgrade is requested
|
onWorkerException
|
UDA. Functions with @onWorkerException attached are called when worker throws an exception
|
onWorkerStart
|
UDA. Functions with @onWorkerStart attached are called when worker is started
|
onWorkerStop
|
UDA. Functions with @onWorkerStop attached are called when worker is stopped
|
Aliases
Name | Type | Description |
route
|
route!((r)=>comparePath!path(r))
|
UDA. You can use to filter requests using a path.
|