Liking cljdoc? Tell your friends :D

hive-gimp.lifecycle.port

The lifecycle seams. Three small protocols, split by reason to change (ISP):

ILinkProbe look, never touch: one Observation of the link. ILifecycle the remedies a HealPlan names, one method per step kind that acts on the world. IClock time, so awaiting an answer is testable without sleeping.

The host adapters live in hive-gimp.lifecycle.host; the suite's fakes in test/hive_gimp/lifecycle/fake.clj. Every method returns data and never throws for an expected failure: a remedy that did not work is a {:ok? false} the planner escalates on, not an exception that ends the heal before the next remedy is tried.

The lifecycle seams. Three small protocols, split by reason to change (ISP):

  ILinkProbe   look, never touch: one `Observation` of the link.
  ILifecycle   the remedies a `HealPlan` names, one method per step kind
               that acts on the world.
  IClock       time, so awaiting an answer is testable without sleeping.

The host adapters live in `hive-gimp.lifecycle.host`; the suite's fakes in
`test/hive_gimp/lifecycle/fake.clj`. Every method returns data and never
throws for an expected failure: a remedy that did not work is a
`{:ok? false}` the planner escalates on, not an exception that ends the
heal before the next remedy is tried.
raw docstring

IClockclj/sprotocol

now-msclj/s

(now-ms clock)

Milliseconds, monotonic enough to measure a wait.

Milliseconds, monotonic enough to measure a wait.

sleep!clj/s

(sleep! clock ms)

Wait ms.

Wait `ms`.
source

ILifecycleclj/sprotocol

kill-listener!clj/s

(kill-listener! lc endpoint)

Stop the process holding endpoint's port. GIMP itself survives: the holder is the plug-in process, not the GUI.

Stop the process holding `endpoint`'s port. GIMP itself survives: the
holder is the plug-in process, not the GUI.

launch-headless!clj/s

(launch-headless! lc endpoint)

Start a headless GIMP, owned by hive-gimp, that runs the MCP server. Answers {:ok? true :detail ProcessHandle}.

Start a headless GIMP, owned by hive-gimp, that runs the MCP server.
Answers `{:ok? true :detail ProcessHandle}`.

relaunch-in-gui!clj/s

(relaunch-in-gui! lc endpoint)

Start the MCP server procedure inside the running GUI GIMP, no human.

Start the MCP server procedure inside the running GUI GIMP, no human.

restart-server!clj/s

(restart-server! lc endpoint)

Ask a live plug-in to drop and re-bind its socket (restart_server).

Ask a live plug-in to drop and re-bind its socket (`restart_server`).

stop-owned!clj/s

(stop-owned! lc)

Stop the headless GIMP this adapter launched, if any.

Stop the headless GIMP this adapter launched, if any.
source

ILinkProbeclj/sprotocol

observeclj/s

(observe probe endpoint)

An Observation of the MCP link at endpoint ({:host :port ...}).

An `Observation` of the MCP link at `endpoint` ({:host :port ...}).
source

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