babashka.pods: transit read+write handlers
This commit is contained in:
parent
454ed43ae4
commit
5ce7f2d67d
2 changed files with 13 additions and 6 deletions
2
pods
2
pods
|
|
@ -1 +1 @@
|
||||||
Subproject commit 82aa3627106181a0ad58c289cd45129603e4fa24
|
Subproject commit 1fdd8231bd3a396c4d12c40fecc9dd0328b288d3
|
||||||
|
|
@ -2,10 +2,17 @@
|
||||||
{:no-doc true}
|
{:no-doc true}
|
||||||
(:refer-clojure :exclude [read])
|
(:refer-clojure :exclude [read])
|
||||||
(:require [babashka.impl.common :refer [ctx]]
|
(:require [babashka.impl.common :refer [ctx]]
|
||||||
[babashka.pods.sci :as pods]))
|
[babashka.pods.sci :as pods]
|
||||||
|
[sci.core :as sci]))
|
||||||
|
|
||||||
|
(defn load-pod [& args]
|
||||||
|
(apply pods/load-pod @ctx args))
|
||||||
|
|
||||||
|
(def podns (sci/create-ns 'babashka.pods nil))
|
||||||
|
|
||||||
(def pods-namespace
|
(def pods-namespace
|
||||||
{'load-pod (fn [& args]
|
{'load-pod (sci/copy-var load-pod podns)
|
||||||
(apply pods/load-pod @ctx args))
|
'invoke (sci/copy-var pods/invoke podns)
|
||||||
'invoke pods/invoke
|
'unload-pod (sci/copy-var pods/unload-pod podns)
|
||||||
'unload-pod pods/unload-pod})
|
'add-transit-read-handler (sci/copy-var pods/add-transit-read-handler podns)
|
||||||
|
'add-transit-write-handler (sci/copy-var pods/add-transit-write-handler podns)})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue