Liking cljdoc? Tell your friends :D

dev.arkaitz.web-base.server

Jetty behind two functions. Jetty lives entirely inside the base (SPEC §10): the host sees a handle map, never the server class. The bound port is in the handle because with :port 0 there is no other way to learn it without Jetty's own API.

Jetty behind two functions. Jetty lives entirely inside the base (SPEC
§10): the host sees a handle map, never the server class. The bound port is
in the handle because with `:port 0` there is no other way to learn it
without Jetty's own API.
raw docstring

default-stop-timeout-msclj

How long stop lets requests already in flight finish. Jetty's own default is 0, which cuts them, so this is the base's policy (decided with the user 2026-09-27): well inside the grace period Kubernetes (30 s) and systemd (90 s) give a process before killing it, with room left for the rest of a system's halt.

How long `stop` lets requests already in flight finish. Jetty's own default is 0,
which cuts them, so this is the base's policy (decided with the user 2026-09-27):
well inside the grace period Kubernetes (30 s) and systemd (90 s) give a process
before killing it, with room left for the rest of a system's halt.
sourceraw docstring

startclj

(start handler {:keys [port configurator stop-timeout-ms] :as options})

Starts Jetty on handler and returns {:server s :port n}. Options are ring-jetty-adapter's, minus :join?, which is always false: a joining start blocks the caller forever, which is a hang, not a server. Plus :stop-timeout-ms, how long stop lets requests in flight finish while it refuses new ones — default-stop-timeout-ms when absent or nil, 0 to cut them. A host's own :configurator still runs, after the base's.

Starts Jetty on `handler` and returns `{:server s :port n}`. Options are
ring-jetty-adapter's, minus `:join?`, which is always false: a joining
start blocks the caller forever, which is a hang, not a server. Plus
`:stop-timeout-ms`, how long `stop` lets requests in flight finish while it refuses
new ones — `default-stop-timeout-ms` when absent or nil, 0 to cut them. A host's own
`:configurator` still runs, after the base's.
sourceraw docstring

stopclj

(stop {:keys [server]})

Stops the server behind a handle returned by start: new connections are refused as the connector closes — within tens of milliseconds, measured — and requests in flight get the handle's window to finish. Returns nil.

Jetty answers a window that ran out by throwing a TimeoutException from its stop, with the connector already closed and its threads already gone (measured). That is the policy working, not a failure to stop, so it is logged and swallowed here: thrown, it would abort the halt of everything else a system holds.

Stops the server behind a handle returned by `start`: new connections are refused as
the connector closes — within tens of milliseconds, measured — and requests in flight
get the handle's window to finish. Returns nil.

Jetty answers a window that ran out by throwing a `TimeoutException` from its stop,
with the connector already closed and its threads already gone (measured). That is
the policy working, not a failure to stop, so it is logged and swallowed here: thrown,
it would abort the halt of everything else a system holds.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close