Public entry point. Inert until init!.
Public entry point. Inert until `init!`.
(capacity! n)Retain n settled, delivered registry entries (§5). Adjustable mid-run;
init!'s :capacity is the durable setting. Raising widens the pool
immediately. Lowering evicts nothing by itself: the excess goes at the
next admission, so a too-hasty reduction can still be undone before
anything is lost, and eviction stays announced where it always is — in a
response footer.
Retain `n` settled, delivered registry entries (§5). Adjustable mid-run; `init!`'s `:capacity` is the durable setting. Raising widens the pool immediately. Lowering evicts nothing by itself: the excess goes at the next admission, so a too-hasty reduction can still be undone before anything is lost, and eviction stays announced where it always is — in a response footer.
(init!)(init! opts)Start the MCP endpoint. Idempotent: a second call returns the running one
rather than binding another, whatever options it is given; stop!
first to change them. A start that fails — a bad option, the port
taken — throws and leaves the host as it was.
Accepts:
opts — optional map:
:port Long, default 7888. 0 takes any free port.
:bind String, the interface to bind. Default "127.0.0.1".
:allowed-origins Set of browser Origin values accepted. Default
#{}, which refuses every browser.
:capacity Long, settled and delivered registry entries
retained. Default 20.
:describe String, the server's self-description, for the
connect-time intro. Default nil.
:gateway? Boolean, be the one address a fleet is reached
through. Default false.
:attach String, a gateway's base address,
"http://host:port", to attach to as a node of its
fleet. Not together with :gateway?.
:name String, this instance's identity among a fleet.
Default the hostname. Read only with :gateway?
or :attach.
Output shape:
{:url String ; where the endpoint answers
:opts Map} ; the options in effect, :port the one it got
Start the MCP endpoint. Idempotent: a second call returns the running one
rather than binding another, whatever options it is given; `stop!`
first to change them. A start that fails — a bad option, the port
taken — throws and leaves the host as it was.
Accepts:
opts — optional map:
:port Long, default 7888. 0 takes any free port.
:bind String, the interface to bind. Default "127.0.0.1".
:allowed-origins Set of browser `Origin` values accepted. Default
#{}, which refuses every browser.
:capacity Long, settled and delivered registry entries
retained. Default 20.
:describe String, the server's self-description, for the
connect-time intro. Default nil.
:gateway? Boolean, be the one address a fleet is reached
through. Default false.
:attach String, a gateway's base address,
"http://host:port", to attach to as a node of its
fleet. Not together with `:gateway?`.
:name String, this instance's identity among a fleet.
Default the hostname. Read only with `:gateway?`
or `:attach`.
Output shape:
{:url String ; where the endpoint answers
:opts Map} ; the options in effect, `:port` the one it got(status)The running endpoint as init! returned it, nil when there is none.
The running endpoint as `init!` returned it, nil when there is none.
(stop!)Release the endpoint. Safe to call when not running.
Release the endpoint. Safe to call when not running.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |