std.lib.system

array

added in 3.0

(array {:keys [constructor defaults]} config)

constructs a system array

(array {:constructor map->Database} {:id 1} {:id 2})

array?

added in 3.0

(array? x)

checks if object is a system array

(array? (array {:constructor map->Database} {})) => true

primitive?

added in 3.0

(primitive? x)

checks if a component is a primitive type

scaffold:all

added in 3.0

(scaffold:all)

lists all running scaffolds

scaffold:clear

added in 3.0

(scaffold:clear)(scaffold:clear ns)

clears the current system

scaffold:create

added in 3.0

(scaffold:create)(scaffold:create ns)

creates a system

scaffold:current

added in 3.0

(scaffold:current)(scaffold:current ns)

returns the current scaffold

scaffold:deregister

added in 3.0

(scaffold:deregister)(scaffold:deregister ns)

deregisters a scaffold in the namespace

scaffold:new

added in 3.0

(scaffold:new)(scaffold:new ns)

creates and starts a system

scaffold:register

added in 3.0

(scaffold:register)(scaffold:register m)(scaffold:register ns {:keys [instance topology config options wrap], :or {instance (env/ns-get ns "*instance*"), topology (env/ns-get ns "*topology*"), config (env/ns-get ns "config"), options {}, wrap identity}})

registers a scaffold in the namespace

scaffold:registered

added in 3.0

(scaffold:registered)

lists all registered scaffolds

scaffold:restart

added in 3.0

(scaffold:restart)(scaffold:restart ns)

restarts the system

scaffold:start

added in 3.0

(scaffold:start)(scaffold:start ns)

starts the system

scaffold:stop

added in 3.0

(scaffold:stop)(scaffold:stop ns)

stops the system

scaffold:stop-all

added in 3.0

(scaffold:stop-all)

kills all running scaffolds

subsystem

added in 3.0

(subsystem system keys)

returns the subsystem given certain keys

(subsystem +sys+ #{:entry})

system

added in 3.0

(system topology config)(system topology config {:keys [partial? tag display notify], :as opts})

creates a system of components

;; The topology specifies how the system is linked (def topo {:db map->Database :files map->Filesystem :catalogs [map->Catalog :files {:type :element :as :fs} :db]})

system?

added in 3.0

(system? obj)

checks if a component extends ISystem

valid-subcomponents

added in 3.0

(valid-subcomponents full-topology keys)

returns only the components that will work (for partial systems)

wait

added in 3.0

(wait system key)(wait system key {:keys [success error failure max-retries timeout], :as callback})

wait for a system entry to come online

wait-for

added in 3.0

(wait-for system keys)(wait-for system keys {:keys [start final], :as callback})

wait for all system entries to come online