From 8f92322b4b5fc96267db8cbf6585e408b15ae79e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 10:11:39 +0200 Subject: [PATCH] Bump github.com/nats-io/nats.go from 1.36.0 to 1.37.0 (#3308) * Bump github.com/nats-io/nats.go from 1.36.0 to 1.37.0 Bumps [github.com/nats-io/nats.go](https://github.com/nats-io/nats.go) from 1.36.0 to 1.37.0. - [Release notes](https://github.com/nats-io/nats.go/releases) - [Commits](https://github.com/nats-io/nats.go/compare/v1.36.0...v1.37.0) --- updated-dependencies: - dependency-name: github.com/nats-io/nats.go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * regen mocks to fix failing tests --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Gerard Snaauw --- events/conn.go | 8 ++++---- events/mock.go | 16 ++++++++++++++-- go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/events/conn.go b/events/conn.go index 3088a503e9..b7e7cb2f2c 100644 --- a/events/conn.go +++ b/events/conn.go @@ -39,7 +39,7 @@ type Conn interface { JetStream(opts ...nats.JSOpt) (nats.JetStreamContext, error) } -// JetStreamContext defines the interface for the JetStreamContext of the NATS connection +// JetStreamContext is a copy of the nats.JetStreamContext interface that exists for mocking purposes type JetStreamContext interface { nats.JetStreamContext } @@ -47,14 +47,14 @@ type JetStreamContext interface { // ConnectionPool defines the interface for a NATS connection-pool type ConnectionPool interface { // Acquire returns a NATS connection and JetStream context - Acquire(ctx context.Context) (Conn, JetStreamContext, error) + Acquire(ctx context.Context) (Conn, nats.JetStreamContext, error) // Shutdown closes all the connections Shutdown() } type connectionAndContext struct { conn Conn - js JetStreamContext + js nats.JetStreamContext } // NATSConnectFunc defines the function signature for the NATS connection factory @@ -79,7 +79,7 @@ func NewNATSConnectionPool(config Config) *NATSConnectionPool { } // Acquire returns a NATS connection and JetStream context, it will connect if not already connected -func (pool *NATSConnectionPool) Acquire(ctx context.Context) (Conn, JetStreamContext, error) { +func (pool *NATSConnectionPool) Acquire(ctx context.Context) (Conn, nats.JetStreamContext, error) { log.Logger().Trace("Trying to acquire a NATS connection") // If the connection is already set, return it diff --git a/events/mock.go b/events/mock.go index ca1e31ba68..4e7a7aef88 100644 --- a/events/mock.go +++ b/events/mock.go @@ -193,6 +193,18 @@ func (mr *MockJetStreamContextMockRecorder) ChanSubscribe(subj, ch any, opts ... return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChanSubscribe", reflect.TypeOf((*MockJetStreamContext)(nil).ChanSubscribe), varargs...) } +// CleanupPublisher mocks base method. +func (m *MockJetStreamContext) CleanupPublisher() { + m.ctrl.T.Helper() + m.ctrl.Call(m, "CleanupPublisher") +} + +// CleanupPublisher indicates an expected call of CleanupPublisher. +func (mr *MockJetStreamContextMockRecorder) CleanupPublisher() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CleanupPublisher", reflect.TypeOf((*MockJetStreamContext)(nil).CleanupPublisher)) +} + // ConsumerInfo mocks base method. func (m *MockJetStreamContext) ConsumerInfo(stream, name string, opts ...nats.JSOpt) (*nats.ConsumerInfo, error) { m.ctrl.T.Helper() @@ -923,11 +935,11 @@ func (m *MockConnectionPool) EXPECT() *MockConnectionPoolMockRecorder { } // Acquire mocks base method. -func (m *MockConnectionPool) Acquire(ctx context.Context) (Conn, JetStreamContext, error) { +func (m *MockConnectionPool) Acquire(ctx context.Context) (Conn, nats.JetStreamContext, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Acquire", ctx) ret0, _ := ret[0].(Conn) - ret1, _ := ret[1].(JetStreamContext) + ret1, _ := ret[1].(nats.JetStreamContext) ret2, _ := ret[2].(error) return ret0, ret1, ret2 } diff --git a/go.mod b/go.mod index a2e2e8174c..97d7edf7d2 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( github.com/mr-tron/base58 v1.2.0 github.com/multiformats/go-multicodec v0.9.0 github.com/nats-io/nats-server/v2 v2.10.18 - github.com/nats-io/nats.go v1.36.0 + github.com/nats-io/nats.go v1.37.0 github.com/nuts-foundation/crypto-ecies v0.0.0-20211207143025-5b84f9efce2b github.com/nuts-foundation/go-did v0.14.0 github.com/nuts-foundation/go-leia/v4 v4.0.3 diff --git a/go.sum b/go.sum index ced32e1938..5813fa037e 100644 --- a/go.sum +++ b/go.sum @@ -479,8 +479,8 @@ github.com/nats-io/jwt/v2 v2.5.8 h1:uvdSzwWiEGWGXf+0Q+70qv6AQdvcvxrv9hPM0RiPamE= github.com/nats-io/jwt/v2 v2.5.8/go.mod h1:ZdWS1nZa6WMZfFwwgpEaqBV8EPGVgOTDHN/wTbz0Y5A= github.com/nats-io/nats-server/v2 v2.10.18 h1:tRdZmBuWKVAFYtayqlBB2BuCHNGAQPvoQIXOKwU3WSM= github.com/nats-io/nats-server/v2 v2.10.18/go.mod h1:97Qyg7YydD8blKlR8yBsUlPlWyZKjA7Bp5cl3MUE9K8= -github.com/nats-io/nats.go v1.36.0 h1:suEUPuWzTSse/XhESwqLxXGuj8vGRuPRoG7MoRN/qyU= -github.com/nats-io/nats.go v1.36.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8= +github.com/nats-io/nats.go v1.37.0 h1:07rauXbVnnJvv1gfIyghFEo6lUcYRY0WXc3x7x0vUxE= +github.com/nats-io/nats.go v1.37.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8= github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI= github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDmGD0nc= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=