-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nats: switching to new stream for terminal -- work in progress that d…
…oesn't work yet
- Loading branch information
1 parent
fa1aff2
commit 34f1457
Showing
5 changed files
with
82 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { stream as createStream, type Stream } from "@cocalc/nats/sync/stream"; | ||
import { | ||
dstream as createDstream, | ||
type DStream, | ||
} from "@cocalc/nats/sync/dstream"; | ||
import { kv as createKV, type KV } from "@cocalc/nats/sync/kv"; | ||
import { dkv as createDKV, type DKV } from "@cocalc/nats/sync/dkv"; | ||
import { getEnv } from "./env"; | ||
|
||
export type { Stream, DStream, KV, DKV }; | ||
|
||
export async function stream(opts) { | ||
return await createStream({ ...opts, env: await getEnv() }); | ||
} | ||
|
||
export async function dstream(opts) { | ||
return await createDstream({ ...opts, env: await getEnv() }); | ||
} | ||
|
||
export async function kv(opts) { | ||
return await createKV({ ...opts, env: await getEnv() }); | ||
} | ||
|
||
export async function dkv(opts) { | ||
return await createDKV({ ...opts, env: await getEnv() }); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters