class

Alumna::App

Inherits Alumna::Ruleable < Reference < Object

Constructors

new(serializer : Http::Serializer = Http::JsonSerializer.new)
Source

Instance methods

active_requests
Source
close
Source
connections

Local sockets. Not a bus. Default is in-process MemoryConnections.

Source
connections=(connections : Connections)

Local sockets. Not a bus. Default is in-process MemoryConnections.

Source
default_query_limit

Nil = no default $limit. AdapterSuite and sqlite keep all matching rows.

Source
default_query_limit=(value : Int32 | Nil) : Int32 | Nil

Negative is a config error, not a per-request 400.

Source
dispatch(service : Service, ctx : RuleContext) : RuleContext

Central dispatch using merged pipelines. Uncaught Exception from a rule becomes ServiceError.internal (500). Service methods are already wrapped in Service#call_method.

Source
every(interval : Time::Span, &block : -> Nil) : Nil

One fiber. The first action is sleep, then the block, then sleep again. close sets the stop flag. The fiber reads it after sleep and does not start another pass. A block that has started runs until it returns. interval must be greater than zero.

Source
listen(port : Int32 | Nil = 3000, *, host : String = "127.0.0.1", unix_socket : String | Nil = nil, trusted_proxies : TrustedProxies = nil, workers : Int32 | Nil = nil, shutdown_timeout : Time::Span | Nil = 10.seconds, trap_signals : Bool = true)
Source
max_body_size
Source
max_body_size=(max_body_size : Int64)
Source
max_query_limit

Nil = do not clamp. Max never invents a limit when the client omitted $limit.

Source
max_query_limit=(value : Int32 | Nil) : Int32 | Nil
Source
on_stop

close runs these once, in order, before it closes sockets. Register before listen. A raise skips later hooks and skips the socket close.

Source
serializer
Source
services
Source
use(path : String, service : Service) : self
Source
use(path : String, service : Service, &) : self

Same block shape as Alumna.memory. Use this when the service already exists. The block runs with the service as self, then the service is mounted.

Source

Nested types