Skip to content

Commit

Permalink
netaddr is deprecated in favour of netip/netipx (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 authored Sep 14, 2022
1 parent 1d3698a commit 3e1e012
Show file tree
Hide file tree
Showing 9 changed files with 153 additions and 138 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM bufbuild/buf:1.6.0 as buf
FROM golang:1.18-alpine as builder
FROM bufbuild/buf:1.7.0 as buf
FROM golang:1.19-alpine as builder

RUN apk add \
binutils \
Expand Down
12 changes: 8 additions & 4 deletions cmd/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"net/http"
"time"

compress "github.com/klauspost/connect-compress"
goipam "github.com/metal-stack/go-ipam"
Expand Down Expand Up @@ -55,11 +56,14 @@ func (s *server) Run() error {
serverOpts,
))

err := http.ListenAndServe(
s.c.GrpcServerEndpoint,
server := http.Server{
Addr: s.c.GrpcServerEndpoint,
// For gRPC clients, it's convenient to support HTTP/2 without TLS. You can
// avoid x/net/http2 by using http.ListenAndServeTLS.
h2c.NewHandler(mux, &http2.Server{}),
)
Handler: h2c.NewHandler(mux, &http2.Server{}),
ReadHeaderTimeout: 1 * time.Minute,
}

err := server.ListenAndServe()
return err
}
38 changes: 18 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@ go 1.18

require (
github.com/avast/retry-go/v4 v4.1.0
github.com/bufbuild/connect-go v0.2.0
github.com/bufbuild/connect-go v0.4.0
github.com/bufbuild/connect-grpchealth-go v0.1.0
github.com/bufbuild/connect-grpcreflect-go v0.1.0
github.com/go-redis/redis/v8 v8.11.5
github.com/jmoiron/sqlx v1.3.5
github.com/klauspost/connect-compress v0.1.1
github.com/lib/pq v1.10.6
github.com/lib/pq v1.10.7
github.com/metal-stack/v v1.0.3
github.com/stretchr/testify v1.8.0
github.com/testcontainers/testcontainers-go v0.13.0
github.com/urfave/cli/v2 v2.11.1
github.com/urfave/cli/v2 v2.15.0
go.etcd.io/etcd/client/v3 v3.5.4
go.mongodb.org/mongo-driver v1.10.0
go.uber.org/zap v1.21.0
golang.org/x/net v0.0.0-20220728211354-c7608f3a8462
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
go.mongodb.org/mongo-driver v1.10.2
go.uber.org/zap v1.23.0
go4.org/netipx v0.0.0-20220812043211-3cc044ffd68d
golang.org/x/net v0.0.0-20220909164309-bea034e7d591
golang.org/x/sync v0.0.0-20220907140024-f12130a52804
google.golang.org/protobuf v1.28.1
inet.af/netaddr v0.0.0-20220617031823-097006376321
)

require (
Expand All @@ -32,16 +32,16 @@ require (
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/containerd/cgroups v1.0.4 // indirect
github.com/containerd/containerd v1.6.6 // indirect
github.com/containerd/containerd v1.6.8 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/docker/distribution v2.8.1+incompatible // indirect
github.com/docker/docker v20.10.17+incompatible // indirect
github.com/docker/docker v20.10.18+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
Expand All @@ -51,12 +51,12 @@ require (
github.com/magiconair/properties v1.8.6 // indirect
github.com/moby/sys/mount v0.3.3 // indirect
github.com/moby/sys/mountinfo v0.6.2 // indirect
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae // indirect
github.com/montanaflynn/stats v0.6.6 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect
github.com/opencontainers/runc v1.1.3 // indirect
github.com/opencontainers/runc v1.1.4 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
Expand All @@ -69,14 +69,12 @@ require (
go.etcd.io/etcd/api/v3 v3.5.4 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.4 // indirect
go.opencensus.io v0.23.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
go4.org/intern v0.0.0-20220617035311-6925f38cc365 // indirect
go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760 // indirect
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect
golang.org/x/sys v0.0.0-20220909162455-aba9fc2a8ff2 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/genproto v0.0.0-20220728213248-dd149ef739b9 // indirect
google.golang.org/grpc v1.48.0 // indirect
google.golang.org/genproto v0.0.0-20220909194730-69f6226f97e5 // indirect
google.golang.org/grpc v1.49.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 3e1e012

Please sign in to comment.