class
Amber::Server
- Amber::Server
- Reference
- Object
Included Modules
Defined in:
amber/server/server.crConstant Summary
-
Log =
::Log.for(self) -
UNIX_SOCKET_LOCK_MODE =
384 -
Access mode of the
<socket>.lockfile that serializes binds: only the server's own user may open it, so no one else can hold the lock. -
UNIX_SOCKET_LOCK_RETRY_INTERVAL =
50.milliseconds -
Interval between attempts to take a lock another start holds.
-
UNIX_SOCKET_LOCK_TIMEOUT =
10.seconds -
How long a start waits for another start to release the bind lock before it fails with
Socket::BindError. -
UNIX_SOCKET_MODE =
432 -
Access mode of the socket file
server.unix_socketcreates: its owner and group may connect, and no one else. Every peer on the socket is a trusted proxy, so a wider mode would let any local user forge the scheme and client address.
Constructors
Class Method Summary
-
.all_routes : Array(Router::RouteInfo)
Returns all registered routes as structured data for introspection.
-
.configure(&)
Configure should probably be deprecated in favor of settings.
- .handler
- .instance
- .pubsub_adapter
- .router
- .start
Instance Method Summary
- #adapter_based_pubsub : Amber::Adapters::PubSubAdapter | Nil
- #adapter_based_pubsub=(adapter_based_pubsub : Amber::Adapters::PubSubAdapter | Nil)
-
#check_listener_settings! : Nil
Raises
Amber::Exceptions::ConfigurationErrorbefore the server forks or binds whenserver.unix_socketis combined with TLS or with more than one process. - #handler : Amber::Pipe::Pipeline
- #host_url
-
#initialize_adapters
Initialize adapters based on configuration
- #project_name
- #pubsub_adapter : WebSocketAdapter
- #pubsub_adapter=(pubsub_adapter : WebSocketAdapter)
- #router : Amber::Router::Router
- #run
- #scheme
- #settings
- #ssl_enabled?
- #start
- #version
Macros inherited from module Amber::DSL::Server
pipeline(*valves)
pipeline,
routes(valve, scope = "")
routes
Constructor Detail
Class Method Detail
Returns all registered routes as structured data for introspection.
Instance Method Detail
Raises Amber::Exceptions::ConfigurationError before the server forks
or binds when server.unix_socket is combined with TLS or with more
than one process. The settings are read as they stand at start, after
the environment file, AMBER_* variables and config/settings.cr.