class Bezel::Plug::Timeout

include Bezel::Plug

Gives the rest of the pipeline limit to answer a request; past it, the rest is cancelled (at its next wait: a computation that never waits runs to its end first) and the request is answered 503 Service Unavailable (Bezel::TimeoutError).

src/plug/timeout.qz:5

Class methods

def self.new(limit: Duration) -> Bezel::Plug::Timeout

The plug, the limit limit.

src/plug/timeout.qz:11

Methods

def limit -> Duration

The limit.

src/plug/timeout.qz:16

def call(conn: Bezel::Conn) -> Bezel::Conn

The connection changed by this plug.

from Bezel::Plug

src/plug/timeout.qz:18

def wrap(conn: Bezel::Conn, rest: (Bezel::Conn) -> Bezel::Conn) -> Bezel::Conn

Runs this plug, then rest (the plugs after it) unless it halted. Override it to act around the rest: its result is the request's.

from Bezel::Plug

src/plug/timeout.qz:20