initial commit

This commit is contained in:
Mike Mason
2023-07-01 00:04:52 +00:00
commit 80fb879ef6
65 changed files with 3544 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
#!/bin/sh
# script to bootstrap a nats stream
create_stream(){
local name subject
name="$1"; shift
subject="$1"; shift
if nats stream ls | grep -q "$name" 2>/dev/null; then
echo "stream $name already exists" >&2
return 0
fi
echo "Creating stream $name" >&2
nats stream add "$name" \
--subjects "$subject" \
--storage memory \
--replicas 1 \
--retention limits \
--discard old \
--max-msgs=-1 \
--max-msgs-per-subject=-1 \
--max-bytes=-1 \
--max-age=-1 \
--max-msg-size=-1 \
--dupe-window 2m0s \
--no-allow-rollup \
--no-deny-delete \
--no-deny-purge $@
}
create_stream com-infratographer 'com.infratographer.>'
create_stream com-equinixmetal 'com.equinixmetal.>'