(clear runner)
(clear runner id)
clears the program and past spawn information
clears the program and past spawn information
(count-spawn runner)
(count-spawn runner id)
counts all running spawns
counts all running spawns
(create-program program)
creates a runner program
(create-program {:type :constant :id :hello :interval 10})
creates a runner program (create-program {:type :constant :id :hello :interval 10})
(earliest-spawn runner)
(earliest-spawn runner id)
returns earliest created spawn
returns earliest created spawn
(get-all-spawn runner)
(get-all-spawn runner id)
returns all running spawns
returns all running spawns
(get-program runner)
(get-program runner id)
gets the program given runtime and program-id
(get-program |rt3| :test-program) => {}
gets the program given runtime and program-id (get-program |rt3| :test-program) => {}
(get-props {:keys [runtime] :as runner} program-id)
(get-props {:keys [runtime] :as runner} program-id spawn-id)
gets the current props map for the runner
gets the current props map for the runner
(get-spawn runner program-id spawn-id)
gets running spawn with id
gets running spawn with id
(get-state runner)
(get-state runner id)
gets the global state for the program-id
(get-state |rt3| :test-program) => {}
gets the global state for the program-id (get-state |rt3| :test-program) => {}
(install {:keys [runtime] :as runner} program)
installs a program
installs a program
(installed? {:keys [runtime] :as runner} program-id)
checks if program is installed
(test-scaffold (fn [runner _] (installed? runner :world))) => true
checks if program is installed (test-scaffold (fn [runner _] (installed? runner :world))) => true
(kill-all-spawn runner)
(kill-all-spawn runner id)
kills all the running tasks
(-> (doto |rt3| (kill-all :test-program)) (count-spawn :test-program)) => 0
kills all the running tasks (-> (doto |rt3| (kill-all :test-program)) (count-spawn :test-program)) => 0
(kill-spawn runner program-id spawn-id)
stops a spawn and all jobs
(kill-spawn |rt3| :test-program "s1") => spawn?
stops a spawn and all jobs (kill-spawn |rt3| :test-program "s1") => spawn?
(latest runner)
(latest runner id)
returns the latest active or past spawn
returns the latest active or past spawn
(latest-spawn runner)
(latest-spawn runner id)
returns latest created spawn
returns latest created spawn
(latest-stopped runner)
(latest-stopped runner id)
returns the most recently stopped spawn
returns the most recently stopped spawn
(list-spawn runner)
(list-spawn runner id)
lists all running spawns
lists all running spawns
(list-stopped runner)
(list-stopped runner id)
lists all stopped spawns
lists all stopped spawns
(runner)
(runner m)
creates and starts a runner
(-> (runner {:id "runner"}) (h/comp:kill))
creates and starts a runner (-> (runner {:id "runner"}) (h/comp:kill))
(runner:create)
(runner:create m)
creates a runner
(runner:create {:id "runner"}) => runner?
creates a runner (runner:create {:id "runner"}) => runner?
(runner:health runner)
returns health of runner
(runner:health |run|) => {:status :ok}
returns health of runner (runner:health |run|) => {:status :ok}
(runner:info {:keys [runtime] :as runner})
returns runner info
(h/with:component [runner (runner:create {})] (runner:info runner)) => {:executors {:core {:threads 0, :active 0, :queued 0, :terminated false}, :scheduler {:threads 0, :active 0, :queued 0, :terminated false}}, :programs {}}
returns runner info (h/with:component [runner (runner:create {})] (runner:info runner)) => {:executors {:core {:threads 0, :active 0, :queued 0, :terminated false}, :scheduler {:threads 0, :active 0, :queued 0, :terminated false}}, :programs {}}
(runner:kill {:keys [runtime] :as runner})
kills the runner
kills the runner
(runner:start {:keys [runtime] :as runner})
starts up the runner
(-> (runner:start |runner|) (runner:info)) => {:executors {:core {:threads 0, :active 0, :queued 0, :terminated false}, :scheduler {:threads 0, :active 0, :queued 0, :terminated false}}, :programs {}}
starts up the runner (-> (runner:start |runner|) (runner:info)) => {:executors {:core {:threads 0, :active 0, :queued 0, :terminated false}, :scheduler {:threads 0, :active 0, :queued 0, :terminated false}}, :programs {}}
(runner:started? {:keys [runtime] :as runner})
checks if runner is started
(runner:started? |run|) => true
checks if runner is started (runner:started? |run|) => true
(runner:stop {:keys [runtime] :as runner})
stops the runner
stops the runner
(runner:stopped? {:keys [runtime] :as runner})
checks if runner has stopped
(-> (doto |run| (runner:kill)) (runner:stopped?)) => true
checks if runner has stopped (-> (doto |run| (runner:kill)) (runner:stopped?)) => true
(runner? obj)
checks if object is a runner
(runner? |run|) => true
checks if object is a runner (runner? |run|) => true
(set-interval {:keys [runtime] :as runner} program-id interval)
(set-interval {:keys [runtime] :as runner} program-id spawn-id interval)
manually overrides the interval for a spawn/program
(h/bench-ms (test-scaffold (fn [runner q] (set-interval runner :world 10) (spawn runner :world) (doall (for [i (range 2)] (cc/take q)))))) => #(<= 15 % 50)
manually overrides the interval for a spawn/program (h/bench-ms (test-scaffold (fn [runner q] (set-interval runner :world 10) (spawn runner :world) (doall (for [i (range 2)] (cc/take q)))))) => #(<= 15 % 50)
(spawn runner program-id)
(spawn {:keys [runtime] :as runner} program-id opts spawn-id)
spawns a runner that contains the program
spawns a runner that contains the program
(stop-all-spawn runner)
(stop-all-spawn runner id)
stops all the running tasks
(-> (doto |rt3| (stop-all :test-program)) (count-spawn :test-program)) => 0
stops all the running tasks (-> (doto |rt3| (stop-all :test-program)) (count-spawn :test-program)) => 0
(stop-spawn runner program-id spawn-id)
stop a spawn and waits for jobs to finish
stop a spawn and waits for jobs to finish
(trigger runner program-id)
(trigger runner program-id t)
triggers the program manually, without spawning
(test-scaffold (fn [runner q] (trigger runner :world) (trigger runner :world) (count q))) => 2
triggers the program manually, without spawning (test-scaffold (fn [runner q] (trigger runner :world) (trigger runner :world) (count q))) => 2
(uninstall {:keys [runtime] :as runner} program-id)
uninstalls a program
uninstalls a program
(unspawn {:keys [runtime] :as runner} program-id)
unspawns the running program
unspawns the running program
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close