Readme update for metadata (#41)
This commit is contained in:
parent
973c4e5c9e
commit
f360afa613
1 changed files with 18 additions and 0 deletions
18
README.md
18
README.md
|
|
@ -337,6 +337,24 @@ In the pod client:
|
||||||
nil
|
nil
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Metadata
|
||||||
|
|
||||||
|
Pods may attach metadata to functions and macros by sending data to the pod client
|
||||||
|
in a `"meta"` field as part of a `"var"` section. The metadata must be an appropriate
|
||||||
|
map, encoded as an EDN string. This is only applicable to vars in the pod and will be
|
||||||
|
ignored if the var refers to Client-side code, since metadata can already be defined
|
||||||
|
in those code blocks.
|
||||||
|
|
||||||
|
For example, a pod can define a function called `add`:
|
||||||
|
|
||||||
|
``` clojure
|
||||||
|
{"format" "json"
|
||||||
|
"namespaces"
|
||||||
|
[{"name" "pod.babashka.demo"
|
||||||
|
"vars" [{"name" "add"
|
||||||
|
"meta" "{:doc \"arithmetic addition of 2 arguments\" :arglists ([a b])}"}]}]}
|
||||||
|
```
|
||||||
|
|
||||||
#### Deferred namespace loading
|
#### Deferred namespace loading
|
||||||
|
|
||||||
When your pod exposes multiple namespaces that can be used independently from
|
When your pod exposes multiple namespaces that can be used independently from
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue