15 lines
440 B
Text
15 lines
440 B
Text
|
|
#!/usr/bin/env nu
|
||
|
|
# Derived variables for nats bundle rendering.
|
||
|
|
|
||
|
|
def main [component_json: string]: nothing -> nothing {
|
||
|
|
let nats = ($component_json | from json)
|
||
|
|
let js = ($nats | get -o jetstream | default {})
|
||
|
|
{
|
||
|
|
taskserv: $nats,
|
||
|
|
jetstream_max_mem: ($js | get -o max_mem | default "256MB"),
|
||
|
|
jetstream_max_file: ($js | get -o max_file | default "1GB"),
|
||
|
|
}
|
||
|
|
| to json --raw
|
||
|
|
| print
|
||
|
|
}
|