Skip to content

Commit

Permalink
jetstreamext: Add direct get batch functions
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Piotrowski <[email protected]>
  • Loading branch information
piotrpio committed Feb 2, 2025
1 parent 18347ac commit 2837b79
Show file tree
Hide file tree
Showing 12 changed files with 1,085 additions and 4 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/jetstreamext.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: jetstreamext
on:
push:
paths:
- 'jetstreamext/**'

pull_request:
paths:
- 'jetstreamext/**'


jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Install deps
working-directory: jetstreamext
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
go get -t ./...
go install honnef.co/go/tools/cmd/staticcheck@latest
go install github.com/client9/misspell/cmd/misspell@latest
- name: Run linters
working-directory: jetstreamext
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
$(exit $(go fmt ./... | wc -l))
go vet ./...
go vet ./test/...
staticcheck ./...
staticcheck ./test/...
find . -type f -name "*.go" | xargs misspell -error -locale US
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Run tests
working-directory: jetstreamext
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
go test -v -count=1 ./...
go test -v -count=1 ./test/...
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ You can use the library as a whole, or pick just what you need.

# Utilities

| Module | Description | Docs | Version |
|----------------------|----------------------------------------------|--------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|
| Core NATS Extensions | Core NATS extensions | [README.md](natsext/README.md) | [![Go Reference][natsext-image]][natsext-url] |
| `natscontext` | Allow connecting to NATS using NATS Contexts | [README.md](natscontext/README.md) | [![Go Reference][natscontext-image]][natscontext-url] |
| Module | Description | Docs | Version |
|----------------------|----------------------------------------------|--------------------------------------|-----------------------------------------------------------|
| Core NATS Extensions | Core NATS extensions | [README.md](natsext/README.md) | [![Go Reference][natsext-image]][natsext-url] |
| JetStream Extensions | JetStream extensions | [README.md](jetstreamext/README.md) | [![Go Reference][jetstreamext-image]][jetstreamext-url] |
| `natscontext` | Allow connecting to NATS using NATS Contexts | [README.md](natscontext/README.md) | [![Go Reference][natscontext-image]][natscontext-url] |
| NATS System Client | NATS client for NATS monitoring APIs | [README.md](natssysclient/README.md) | [![Go Reference][natssysclient-image]][natssysclient-url] |

[natsext-url]: https://pkg.go.dev/github.com/synadia-io/orbit.go/natsext
[natsext-image]: https://pkg.go.dev/badge/github.com/synadia-io/orbit.go/natsext.svg
[jetstreamext-url]: https://pkg.go.dev/github.com/synadia-io/orbit.go/jetstreamext
[jetstreamext-image]: https://pkg.go.dev/badge/github.com/synadia-io/orbit.go/jetstreamext.svg
[natscontext-url]: https://pkg.go.dev/github.com/synadia-io/orbit.go/natscontext
[natscontext-image]: https://pkg.go.dev/badge/github.com/synadia-io/orbit.go/natscontext.svg
[natssysclient-url]: https://pkg.go.dev/github.com/synadia-io/orbit.go/natssysclient
Expand Down
25 changes: 25 additions & 0 deletions jetstreamext/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Core NATS Extensions

[License-Url]: https://www.apache.org/licenses/LICENSE-2.0
[License-Image]: https://img.shields.io/badge/License-Apache2-blue.svg
[ReportCard-Url]: https://goreportcard.com/report/github.com/synadia-io/orbit.go/jetstreamext
[ReportCard-Image]: https://goreportcard.com/badge/github.com/synadia-io/orbit.go/jetstreamext
[Build-Status-Url]: https://github.com/synadia-io/orbit.go/actions/workflows/jetstreamext.yaml
[Build-Status-Image]: https://github.com/synadia-io/orbit.go/actions/workflows/jetstreamext.yaml/badge.svg?branch=main
[GoDoc-Url]: https://pkg.go.dev/github.com/synadia-io/orbit.go/jetstreamext
[GoDoc-Image]: https://pkg.go.dev/badge/github.com/synadia-io/orbit.go/jetstreamext.svg

[![License][License-Image]][License-Url]
[![Go Reference][GoDoc-Image]][GoDoc-Url]
[![Build Status][Build-Status-Image]][Build-Status-Url]
[![Go Report Card][ReportCard-Image]][ReportCard-Url]

JetStream Extensions is a set of utilities providing additional features to `jetstream` pacakge in nats.go client.

## Installation

```bash
go get github.com/synadia-io/orbit.go/jetstreamext
```

## TODO: add readme
Loading

0 comments on commit 2837b79

Please sign in to comment.