https://github.com/peterhellberg/butts-service
An example of using NATS JetStream Key/Value Store and Micro
https://github.com/peterhellberg/butts-service
butts golang jetstream nats
Last synced: 11 months ago
JSON representation
An example of using NATS JetStream Key/Value Store and Micro
- Host: GitHub
- URL: https://github.com/peterhellberg/butts-service
- Owner: peterhellberg
- License: mit
- Created: 2024-12-04T19:04:25.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-04T20:07:57.000Z (about 1 year ago)
- Last Synced: 2025-02-01T10:11:56.067Z (about 1 year ago)
- Topics: butts, golang, jetstream, nats
- Language: Go
- Homepage:
- Size: 972 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# butts-service :peach:
An example of using [NATS](https://nats.io/) [JetStream](https://docs.nats.io/nats-concepts/jetstream)
[Key/Value Store](https://docs.nats.io/nats-concepts/jetstream/key-value-store)
and [Micro](https://github.com/nats-io/nats.go/tree/main/micro#nats-micro)
## Requirements
- [Go](https://go.dev/)
## Usage
> [!TIP]
> Running NATS with JetStream enabled under docker can be done like so:
> `docker pull nats:latest`
> and then:
> `docker run --rm -it --name nats-server -d -p 4222:4222 nats -js`
>
> If you just want to use `go` then `go run github.com/nats-io/nats-server/v2@v2.10.22 -js`
If you have a NATS Server (with JetStream :rocket: enabled) on `localhost:4222` then:
```
go run github.com/peterhellberg/butts-service@latest
```
Now you should be able to run:
```
go run github.com/nats-io/natscli/nats@latest req svc.butts --count 100 ""
```