#事件存储 #lmdb #队列 #命令行界面

bin+lib xs-lib

xs-lib 是一个命令行工具 (xs) 和一个 Rust 库 (xs_lib),用于记录和检索数据包的顺序流。它使用闪电内存映射数据库 (LMDB) 进行本地数据存储。

3 个版本 (破坏性更新)

0.4.0 2023 年 6 月 1 日
0.3.0 2023 年 5 月 25 日
0.2.0 2023 年 5 月 24 日

#14 in #事件存储

每月 27 次下载

MIT 许可证

19KB
416

xs

这是一个命令行工具 (xs) 和一个 Rust 库 (xs_lib),用于记录和检索数据包的顺序流。它使用 闪电内存映射数据库 (LMDB) 进行高效和可靠的本地嵌入式存储。

安装

cargo install xs-lib

用法

xs 很容易使用。以下是一个记录和检索数据包顺序流的示例

# Record a payload
% echo "hello world" | xs ./s put

# Retrieve the payloads
% xs ./s cat
{"id":"039KW46V39SC3LYMJSMHJJJRH","data":"hello world"}

ID 是 SCRU128

命令行界面

以下是 xs 可用的命令

Usage: xs <PATH> <COMMAND>

Commands:
  put    Insert a payload into the store from stdin, with optional follow
  get    Fetch a specific payload by ID
  cat    Stream payloads from store with optional last_id and follow
  call   Send request to topic, wait for response, print output
  serve  Listen for requests, execute command, write output back
  help   Print this message or the help of the given subcommand(s)

Arguments:
  <PATH>

Options:
  -h, --help     Print help
  -V, --version  Print version

许可证

xs 在 MIT 许可证下发布。有关更多详细信息,请参阅 LICENSE 文件。

贡献

欢迎对 xs 的贡献!

依赖关系

~4–17MB
~201K SLoC