https://github.com/cablehead/xs-0
crossing the streams
https://github.com/cablehead/xs-0
cli eventstore lmdb rust
Last synced: 2 months ago
JSON representation
crossing the streams
- Host: GitHub
- URL: https://github.com/cablehead/xs-0
- Owner: cablehead
- License: mit
- Created: 2022-10-26T18:53:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-01T13:48:21.000Z (almost 2 years ago)
- Last Synced: 2025-03-25T05:05:50.494Z (2 months ago)
- Topics: cli, eventstore, lmdb, rust
- Language: Rust
- Homepage: https://docs.rs/xs-lib
- Size: 33.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# xs
This is a command-line tool (`xs`) and a Rust library (`xs_lib`) for recording
and retrieving sequential streams of payloads. It uses [Lightning Memory-Mapped
Database](http://www.lmdb.tech/doc/)
([LMDB](https://docs.rs/lmdb-rkv/0.14.0/lmdb/)) for efficient and reliable
local embedded storage.## Installation
```
cargo install xs-lib
```## Usage
`xs` is easy to use. Here's an example of recording and retrieving a sequential
stream of payloads:```shell
# Record a payload
% echo "hello world" | xs ./s put# Retrieve the payloads
% xs ./s cat
{"id":"039KW46V39SC3LYMJSMHJJJRH","data":"hello world"}
```IDs are [SCRU128](https://github.com/scru128/rust)s.
### Command-Line Interface
Here are the available commands for `xs`:
```
Usage: xsCommands:
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:
Options:
-h, --help Print help
-V, --version Print version
```## License
`xs` is released under the MIT License. See the `LICENSE` file for more details.
## Contributing
Contributions to `xs` are welcome!