nats-client

module
v0.0.0-...-989ae23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2026 License: MIT

README ΒΆ

release codecov go report card license build powered by conventional commits nats built with just gitHub commit activity go reference

NATS Client

A Go package for connecting to and interacting with a NATS server.

πŸ“¦ Install

go get github.com/osapi-io/nats-client

✨ Features

See 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

πŸ“‹ Examples

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

πŸ“– Documentation

See the package documentation on pkg.go.dev for API details.

🀝 Contributing

See the Contributing guide for prerequisites, setup, conventions, and the PR workflow.

πŸ“„ License

The MIT License.

Directories ΒΆ

Path Synopsis
pkg
client
Package client provides a NATS JetStream client with connection management, KV stores, KV-backed streams, and consumer helpers.
Package client provides a NATS JetStream client with connection management, KV stores, KV-backed streams, and consumer helpers.
client/mocks
Package mocks provides generated mock implementations for testing.
Package mocks provides generated mock implementations for testing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL