A Go package for connecting to and interacting with a NATS server.
go get github.com/osapi-io/nats-clientSee the client docs for quick start, authentication, and per-feature reference.
| Feature | Description | Docs | Source |
|---|---|---|---|
| Connection management | Connect to NATS with configurable options and auth modes | docs | connect.go |
| JetStream | Create and manage JetStream streams | docs | jetstream.go |
| Key-Value stores | CRUD operations on NATS KV buckets | docs | kv.go |
| KV-backed streams | KV storage with stream notifications | docs | kv_stream.go |
| Consumer helpers | JetStream consumer message processing | docs | consumer.go |
| Object Store | Large blob storage with automatic chunking | docs | objectstore.go |
Each example is a standalone Go program you can read and run.
| Example | What it shows |
|---|---|
| auth-none-stream | Stream publish/subscribe without authentication |
| auth-none-kv | KV store operations without authentication |
| auth-user-pass-stream | Stream with username/password authentication |
| auth-nkeys-stream | Stream with NKey authentication |
| workqueue-stream | Work queue pattern with consumer groups |
See the generated documentation for package-level API details.
See the Development guide for prerequisites, setup, and conventions. See the Contributing guide before submitting a PR.
The MIT License.