Skip to content

Commit

Permalink
chore: update etcd client to v3.5.0-alpha.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Gosteli committed Apr 7, 2021
1 parent 877e3c0 commit d969873
Show file tree
Hide file tree
Showing 10 changed files with 311 additions and 80 deletions.
2 changes: 1 addition & 1 deletion etcd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"io/ioutil"
"time"

"github.com/coreos/etcd/clientv3"
"github.com/pkg/errors"
"github.com/postfinance/store"
clientv3 "go.etcd.io/etcd/client/v3"
"google.golang.org/grpc"
)

Expand Down
2 changes: 1 addition & 1 deletion etcd/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"testing"
"time"

"github.com/coreos/etcd/clientv3"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
clientv3 "go.etcd.io/etcd/client/v3"
"google.golang.org/grpc"
)

Expand Down
2 changes: 1 addition & 1 deletion etcd/etcdv3.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"strings"
"time"

"github.com/coreos/etcd/clientv3"
"github.com/pkg/errors"
"github.com/postfinance/store"
clientv3 "go.etcd.io/etcd/client/v3"
"google.golang.org/grpc"
)

Expand Down
4 changes: 2 additions & 2 deletions etcd/etcdv3_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package etcd_test
import (
"log"

"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
"github.com/pkg/errors"
"github.com/postfinance/store/etcd"
"go.etcd.io/etcd/api/v3/v3rpc/rpctypes"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
Expand Down Expand Up @@ -38,7 +38,7 @@ func ExampleWithErrorHandler() {
fatal(err, "grpc Unavailable error - terminating")
}
// handle etcd server-side errors
// https://github.com/coreos/etcd/blob/master/etcdserver/api/v3rpc/rpctypes/error.go
// https://github.com/etcd-io/etcd/blob/api/v3.5.0-alpha.0/api/v3rpc/rpctypes/error.go
switch err {
case rpctypes.ErrNoSpace,
rpctypes.ErrTooManyRequests: // codes.ResourceExhausted
Expand Down
4 changes: 2 additions & 2 deletions etcd/etcdv3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import (
"testing"
"time"

"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/integration"
"github.com/coreos/pkg/capnslog"
"github.com/pkg/errors"
"github.com/postfinance/store"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/tests/v3/integration"
)

func TestKeyFunctions(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion etcd/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"
"time"

"github.com/coreos/etcd/clientv3"
clientv3 "go.etcd.io/etcd/client/v3"
)

const dfltTimeout = 10 * time.Second
Expand Down
2 changes: 1 addition & 1 deletion etcd/health_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"testing"
"time"

"github.com/coreos/etcd/clientv3"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
clientv3 "go.etcd.io/etcd/client/v3"
)

func TestHealth(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion etcd/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"github.com/postfinance/store"

"github.com/coreos/etcd/clientv3"
"github.com/pkg/errors"
clientv3 "go.etcd.io/etcd/client/v3"
)

// Watch installs a watcher on key
Expand Down
28 changes: 4 additions & 24 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,12 @@ module github.com/postfinance/store
go 1.15

require (
github.com/coreos/bbolt v1.3.3 // indirect
github.com/coreos/etcd v3.3.22+incompatible
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/google/btree v1.0.0 // indirect
github.com/google/uuid v1.1.1 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.2.0 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.14.5 // indirect
github.com/jonboulle/clockwork v0.1.0 // indirect
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.5.1 // indirect
github.com/prometheus/procfs v0.0.11 // indirect
github.com/soheilhy/cmux v0.1.4 // indirect
github.com/stretchr/testify v1.6.0
github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966 // indirect
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
go.etcd.io/bbolt v1.3.4 // indirect
go.uber.org/zap v1.15.0 // indirect
golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f // indirect
golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1 // indirect
google.golang.org/grpc v1.26.0
sigs.k8s.io/yaml v1.2.0 // indirect
go.etcd.io/etcd/api/v3 v3.5.0-alpha.0
go.etcd.io/etcd/client/v3 v3.5.0-alpha.0
go.etcd.io/etcd/tests/v3 v3.5.0-alpha.0
google.golang.org/grpc v1.32.0
)
343 changes: 297 additions & 46 deletions go.sum

Large diffs are not rendered by default.

0 comments on commit d969873

Please sign in to comment.