Skip to content

Commit

Permalink
ZING-33961: Update deps (#30)
Browse files Browse the repository at this point in the history
* Update deps

* Fix breaking changes

* Update zenkit build

* Add gitattributes

* Add .out to gitignore
  • Loading branch information
knightpp authored May 14, 2024
1 parent 966eaeb commit 1940ad2
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 153 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/vendor/** -diff linguist-generated
**/mocks/** -diff linguist-generated
/go.sum -diff linguist-generated
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/coverage
junit.xml
*.coverprofile
/vendor/
/vendor/
*.out
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ GINKGO := $(shell command -v ginkgo 2> /dev/null)
GOCOV := $(shell command -v gocov 2> /dev/null)
GOCOVXML := $(shell command -v gocov-xml 2> /dev/null)
COVERAGE_DIR := $(CURDIR)/coverage
ZENKIT_BUILD_VERSION := 1.17.0
ZENKIT_BUILD_VERSION := 1.18.0
BUILD_IMG := zenoss/zenkit-build:$(ZENKIT_BUILD_VERSION)
DOCKER_PARAMS := --rm \
--volume $(ROOTDIR):/workspace/:rw \
Expand Down
25 changes: 15 additions & 10 deletions endpoint/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,21 @@ import (
"go.opencensus.io/stats"
"go.opencensus.io/tag"

grpc_retry "github.com/grpc-ecosystem/go-grpc-middleware/retry"
grpcretry "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/retry"

"google.golang.org/api/support/bundler"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"

data_registry "github.com/zenoss/zenoss-protobufs/go/cloud/data-registry"
"github.com/zenoss/zenoss-protobufs/go/cloud/data_receiver"

"github.com/jellydator/ttlcache/v3"
"github.com/spaolacci/murmur3"
"github.com/twmb/murmur3"
"github.com/zenoss/zenoss-go-sdk/internal/ttl"
"github.com/zenoss/zenoss-go-sdk/log"
zstats "github.com/zenoss/zenoss-go-sdk/stats"
Expand Down Expand Up @@ -242,24 +243,28 @@ func New(config Config) (*Endpoint, error) {
dialOptions := make([]grpc.DialOption, 4)

if config.DisableTLS {
dialOptions[0] = grpc.WithInsecure()
dialOptions[0] = grpc.WithTransportCredentials(
insecure.NewCredentials(),
)
} else {
dialOptions[0] = grpc.WithTransportCredentials(
credentials.NewTLS(
&tls.Config{
InsecureSkipVerify: config.InsecureTLS,
}))
},
),
)
}

// Enable gRPC retry middleware.
retryOptions := []grpc_retry.CallOption{
grpc_retry.WithMax(5),
grpc_retry.WithPerRetryTimeout(config.Timeout / 3),
grpc_retry.WithBackoff(grpc_retry.BackoffLinear(200 * time.Millisecond)),
retryOptions := []grpcretry.CallOption{
grpcretry.WithMax(5),
grpcretry.WithPerRetryTimeout(config.Timeout / 3),
grpcretry.WithBackoff(grpcretry.BackoffLinear(200 * time.Millisecond)),
}

dialOptions[1] = grpc.WithUnaryInterceptor(grpc_retry.UnaryClientInterceptor(retryOptions...))
dialOptions[2] = grpc.WithStreamInterceptor(grpc_retry.StreamClientInterceptor(retryOptions...))
dialOptions[1] = grpc.WithUnaryInterceptor(grpcretry.UnaryClientInterceptor(retryOptions...))
dialOptions[2] = grpc.WithStreamInterceptor(grpcretry.StreamClientInterceptor(retryOptions...))

// Enable OpenCensus gRPC client stats.
dialOptions[3] = grpc.WithStatsHandler(&ocgrpc.ClientHandler{})
Expand Down
48 changes: 23 additions & 25 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,46 +1,44 @@
module github.com/zenoss/zenoss-go-sdk

go 1.18
go 1.22

require (
github.com/cbroglie/mustache v1.4.0
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/jellydator/ttlcache/v3 v3.1.0
github.com/mitchellh/hashstructure v1.1.0
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0
github.com/jellydator/ttlcache/v3 v3.2.0
github.com/mitchellh/hashstructure/v2 v2.0.2
github.com/mitchellh/mapstructure v1.5.0
github.com/onsi/ginkgo/v2 v2.12.0
github.com/onsi/gomega v1.27.10
github.com/rs/zerolog v1.31.0
github.com/spaolacci/murmur3 v1.1.0
github.com/stretchr/testify v1.8.4
github.com/zenoss/zenoss-protobufs v1.2.0
github.com/onsi/ginkgo/v2 v2.16.0
github.com/onsi/gomega v1.30.0
github.com/rs/zerolog v1.32.0
github.com/stretchr/testify v1.9.0
github.com/twmb/murmur3 v1.1.8
github.com/zenoss/zenoss-protobufs v1.5.1
go.opencensus.io v0.24.0
google.golang.org/api v0.143.0
google.golang.org/grpc v1.57.2
google.golang.org/protobuf v1.31.0
google.golang.org/api v0.180.0
google.golang.org/grpc v1.63.2
google.golang.org/protobuf v1.34.1
gopkg.in/yaml.v2 v2.4.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.14.3 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/tools v0.12.0 // indirect
google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 // indirect
github.com/stretchr/objx v0.5.2 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/tools v0.17.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240429193739-8cf5692501f6 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 1940ad2

Please sign in to comment.