Liking cljdoc? Tell your friends :D

hive-addon.hot.port

Ports through which the portable hot-reload core reaches host-specific work.

The core — schema, cascade, strategy — is portable .cljc and names only these protocols. One adapter namespace per host implements them; a per-host wiring namespace constructs the adapters and injects them into the reload context.

Adapters are constructed by FUNCTIONS, never held in a def or defonce: an instance built at load time keeps the class object of whichever protocol var was current then, and stops satisfying the protocol once this namespace is reloaded.

Ports through which the portable hot-reload core reaches host-specific work.

The core — schema, cascade, strategy — is portable .cljc and names only these
protocols. One adapter namespace per host implements them; a per-host wiring
namespace constructs the adapters and injects them into the reload context.

Adapters are constructed by FUNCTIONS, never held in a `def` or `defonce`: an
instance built at load time keeps the class object of whichever protocol var
was current then, and stops satisfying the protocol once this namespace is
reloaded.
raw docstring

IDrainGateclj/sprotocol

Calls in flight per addon id, and a gate that stops admitting new ones: what a plug OUT waits on so an addon is never shut down under a running call.

Calls in flight per addon id, and a gate that stops admitting new ones: what
a plug OUT waits on so an addon is never shut down under a running call.

-close!clj/s

(-close! this id)

Stop admitting calls to ID. Calls already admitted keep running.

Stop admitting calls to ID. Calls already admitted keep running.

-enter!clj/s

(-enter! this id)

Admit one call to ID. True when admitted and counted; false while ID is closed (draining), and the call must not run.

Admit one call to ID. True when admitted and counted; false while ID is
closed (draining), and the call must not run.

-in-flightclj/s

(-in-flight this id)

Admitted calls to ID not yet finished.

Admitted calls to ID not yet finished.

-leave!clj/s

(-leave! this id)

Finish one admitted call to ID.

Finish one admitted call to ID.

-open!clj/s

(-open! this id)

Admit calls to ID again.

Admit calls to ID again.
sourceraw docstring

IHotDirsclj/sprotocol

The source roots hive-hot tracks and watches — the one hive-hot capability a plug IN / plug OUT needs. Owner-scoped: a dir stays tracked while an owner other than the releasing one still claims it.

The source roots hive-hot tracks and watches — the one hive-hot capability a
plug IN / plug OUT needs. Owner-scoped: a dir stays tracked while an owner
other than the releasing one still claims it.

-extend-dirs!clj/s

(-extend-dirs! this req)

Track and watch REQ {:dirs [dir] :owner any :no-reload #{sym}} without resetting the change baseline. Returns hive-hot's ExtendInitReport {:dirs [dir] :added [dir]}, or a hive-dsl err Result.

Track and watch REQ {:dirs [dir] :owner any :no-reload #{sym}} without
resetting the change baseline. Returns hive-hot's ExtendInitReport
{:dirs [dir] :added [dir]}, or a hive-dsl err Result.

-remove-dirs!clj/s

(-remove-dirs! this req)

Release REQ {:dirs [dir] :owner any}. Returns hive-hot's RemoveDirsReport {:removed [dir] :kept [dir] :absent [dir] :dirs [dir] :shared {dir [owner]}}, or a hive-dsl err Result. :kept holds a core dir or one another owner still claims (then also under :shared).

Release REQ {:dirs [dir] :owner any}. Returns hive-hot's RemoveDirsReport
{:removed [dir] :kept [dir] :absent [dir] :dirs [dir] :shared {dir [owner]}},
or a hive-dsl err Result. :kept holds a core dir or one another owner
still claims (then also under :shared).
sourceraw docstring

IMountDriverclj/sprotocol

The effectful half of a remount: shutting an addon slice down and mounting it again through the ordinary mount pipeline.

The effectful half of a remount: shutting an addon slice down and mounting it
again through the ordinary mount pipeline.

-mount!clj/s

(-mount! this plan host opts)

Run the mount pipeline over plan. Returns a MountReport.

Run the mount pipeline over `plan`. Returns a MountReport.

-teardown!clj/s

(-teardown! this host ids)

Shut ids down in reverse dependency order. Returns {:torn-down [id] :errors [string]}.

Shut `ids` down in reverse dependency order.
Returns {:torn-down [id] :errors [string]}.
sourceraw docstring

IMountPreflightclj/sprotocol

Validate a remount BEFORE anything is torn down.

Validate a remount BEFORE anything is torn down.

-preflightclj/s

(-preflight this plan host opts)

Check that every spec in plan could be mounted — licence gate and constructor resolution — WITHOUT constructing, registering or initializing anything. Returns a MountReport (the dry-run shape); :ok? false refuses the remount while every live instance is still in place.

Check that every spec in `plan` could be mounted — licence gate and
constructor resolution — WITHOUT constructing, registering or initializing
anything. Returns a MountReport (the dry-run shape); :ok? false refuses the
remount while every live instance is still in place.
sourceraw docstring

IMountRollbackclj/sprotocol

Remember what is running so a failed remount can put it back.

Remember what is running so a failed remount can put it back.

-snapshotclj/s

(-snapshot this host ids)

{id instance} for the ids that host currently holds, read BEFORE teardown. Handed to -mount! as the :fallback-instance, so an addon whose new instance fails is restored to its previous one, in order.

{id instance} for the `ids` that `host` currently holds, read BEFORE
teardown. Handed to -mount! as the :fallback-instance, so an addon whose
new instance fails is restored to its previous one, in order.
sourceraw docstring

INsReloaderclj/sprotocol

Namespace-level reloading.

Namespace-level reloading.

-reload-nss!clj/s

(-reload-nss! this ns-strs)

Reload ns-strs. Returns {:loaded [sym] :failed sym? :error string?}.

Reload `ns-strs`. Returns {:loaded [sym] :failed sym? :error string?}.
sourceraw docstring

ISourceResolverclj/sprotocol

Where an addon's constructor namespace lives, and whether its bytes can change under a running system.

Where an addon's constructor namespace lives, and whether its bytes can change
under a running system.

-resolve-sourceclj/s

(-resolve-source this ns-str)

Resolve ns-str to an AddonSource map WITHOUT :addon/id:

{:hot/source-kind :directory | :jar | :absent :hot/reloadable? boolean :hot/source-dir <source root, :directory only> :hot/source-url <resolved location, when found>}

MUST NOT throw. A namespace with no source resolves to :absent, which is a strategy input rather than an error.

Resolve `ns-str` to an AddonSource map WITHOUT :addon/id:

  {:hot/source-kind :directory | :jar | :absent
   :hot/reloadable? boolean
   :hot/source-dir  <source root, :directory only>
   :hot/source-url  <resolved location, when found>}

MUST NOT throw. A namespace with no source resolves to :absent, which is a
strategy input rather than an error.
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