Skip to content

Commit

Permalink
Bump dependencies, change license (#1)
Browse files Browse the repository at this point in the history
* bump-dep-versions

* Update test.yml
  • Loading branch information
BoskyWSMFN authored Sep 5, 2024
1 parent 177e501 commit 8f354ed
Show file tree
Hide file tree
Showing 17 changed files with 479 additions and 940 deletions.
4 changes: 1 addition & 3 deletions .docker/docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
version: '3'

services:
test-nats-streaming:
image: nats-streaming:0.20
image: nats-streaming:0.25.6
container_name: test-nats-streaming
networks:
- test-nats-client
Expand Down
26 changes: 11 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,22 @@ jobs:
tests:
strategy:
matrix:
go-version: [ 1.15.x ]
os: [ ubuntu-latest ] # [ macos-latest, windows-latest ]
go-version: [ 1.23.x ]
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
services:
nats-streaming:
image: nats-streaming:0.25.6
ports:
- "4223:4222"
- "8223:8222"

steps:
- name: Create Nats Streaming cluster
run: sudo docker network create nats-streaming && sudo docker run -d -p 4223:4222 -p 8223:8222 --network nats-streaming nats-streaming:0.19

# - name: Test connection to cluster
# uses: onichandame/nats-client-action@master
# with:
# servers: "nats://localhost:4223"
# cluster: "true"

- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v2
- name: Test
run: make tests
2 changes: 1 addition & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ linters:
disable-all: true
enable:
- asciicheck
- depguard
# - depguard
- dogsled
- dupl
- exhaustivestruct
Expand Down
968 changes: 294 additions & 674 deletions LICENSE

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.EXPORT_ALL_VARIABLES:
make.EXPORT_ALL_VARIABLES:

.PHONY: docker_clean_all
docker_clean_all:
Expand Down
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# Advance Nats Streaming
# Advanced Nats Streaming

![img](https://img.shields.io/badge/GPL%20v3.0-GNU%20GENERAL%20PUBLIC%20LICENSE-blue) ![img](https://img.shields.io/badge/code--coverage-70%25-green)
[![Actions Status](https://github.com/imperiuse/advance-nats-client/workflows/Test/badge.svg)](https://github.com/imperiuse/advance-nats-client/actions)
![img](https://img.shields.io/badge/License-EPL_2.0-blue.svg) ![img](https://img.shields.io/badge/code--coverage-70%25-green)
[![Actions Status](https://github.com/imperiuse/advanced-nats-client/v1/workflows/Test/badge.svg)](https://github.com/imperiuse/advanced-nats-client/v1/actions)

Advance NATS and NATS-Streaming client library based on nats.go and stun.go projects
An advanced NATS and NATS-Streaming client library based on the nats.go and stun.go projects.

I try to bring together all pluses and minimize minuses NATS and NATS streaming.
I aim to combine all the advantages and minimize the drawbacks of both NATS and NATS Streaming.

For example:
As you know, Nats Streaming does not support Request-Reply semantic and simple NATS server does not support at least one guarantee publish msg to topics.
For example, as you know, NATS Streaming does not support the Request-Reply pattern, while a simple NATS server does not provide at-least-once message delivery guarantees for publishing messages to topics.

This library is a result, my idea put together NATS and NATS Streaming message pattern in one universal client for both library.
This library is the result of my idea to unify the messaging patterns of both NATS and NATS Streaming into one universal client for both libraries.

## How make tests

Expand All @@ -20,6 +19,6 @@ This library is a result, my idea put together NATS and NATS Streaming message p

## Examples

See in `examples` dir
See the examples directory for usage.

Also, you can see Unit tests
You can also check the unit tests.
5 changes: 2 additions & 3 deletions examples/mock-nats-client-example/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ import (
"os"
"os/signal"

pb "github.com/imperiuse/advance-nats-client/serializable/protobuf"

nc "github.com/imperiuse/advance-nats-client/nats"
nc "github.com/imperiuse/advanced-nats-client/v1/nats"
pb "github.com/imperiuse/advanced-nats-client/v1/serializable/protobuf"
)

// Secondly, run NATS (you can do it f.e. by `make test_env_up`)
Expand Down
5 changes: 2 additions & 3 deletions examples/mock-nats-server-example/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ import (
"os/signal"
"time"

pb "github.com/imperiuse/advance-nats-client/serializable/protobuf"

nc "github.com/imperiuse/advance-nats-client/nats"
nc "github.com/imperiuse/advanced-nats-client/v1/nats"
pb "github.com/imperiuse/advanced-nats-client/v1/serializable/protobuf"
)

// Secondly, run NATS (you can do it f.e. by `make test_env_up`)
Expand Down
4 changes: 2 additions & 2 deletions examples/nats-complex-example/complex.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"os/signal"
"time"

nc "github.com/imperiuse/advance-nats-client/nats"
pb "github.com/imperiuse/advance-nats-client/serializable/protobuf"
nc "github.com/imperiuse/advanced-nats-client/v1/nats"
pb "github.com/imperiuse/advanced-nats-client/v1/serializable/protobuf"
)

// Don't forget run NATS (you can do it f.e. by `make test_env_up`)
Expand Down
2 changes: 1 addition & 1 deletion examples/nats-simple-exmaple/simple.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"time"

nc "github.com/imperiuse/advance-nats-client/nats"
nc "github.com/imperiuse/advanced-nats-client/v1/nats"
)

// Firstly run NATS (you can do it f.e. by `make test_env_up`)
Expand Down
35 changes: 24 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
module github.com/imperiuse/advance-nats-client
module github.com/imperiuse/advanced-nats-client/v1

go 1.16
go 1.23

require (
github.com/gofrs/uuid v3.3.0+incompatible
github.com/gogo/protobuf v1.3.1
github.com/nats-io/nats-streaming-server v0.20.0 // indirect
github.com/nats-io/nats.go v1.10.0
github.com/nats-io/stan.go v0.8.1
github.com/gofrs/uuid v4.4.0+incompatible
github.com/gogo/protobuf v1.3.2
github.com/nats-io/nats.go v1.37.0
github.com/nats-io/stan.go v0.10.4
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.6.1
go.uber.org/atomic v1.7.0
go.uber.org/zap v1.16.0
google.golang.org/protobuf v1.25.0 // indirect
github.com/stretchr/testify v1.9.0
go.uber.org/atomic v1.11.0
go.uber.org/zap v1.27.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/nats-io/nats-server/v2 v2.10.20 // indirect
github.com/nats-io/nats-streaming-server v0.25.6 // indirect
github.com/nats-io/nkeys v0.4.7 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/objx v0.5.2 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/sys v0.25.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 8f354ed

Please sign in to comment.