diff --git a/auth/jwt.go b/auth/jwt.go index 12ccc62c6..99b2d6b5c 100644 --- a/auth/jwt.go +++ b/auth/jwt.go @@ -15,11 +15,11 @@ package auth import ( + "context" "crypto/rsa" "io/ioutil" jwt "github.com/dgrijalva/jwt-go" - "golang.org/x/net/context" ) type tokenJWT struct { diff --git a/auth/simple_token.go b/auth/simple_token.go index e39678d6c..aa30b045b 100644 --- a/auth/simple_token.go +++ b/auth/simple_token.go @@ -18,6 +18,7 @@ package auth // JWT based mechanism will be added in the near future. import ( + "context" "crypto/rand" "fmt" "math/big" @@ -25,8 +26,6 @@ import ( "strings" "sync" "time" - - "golang.org/x/net/context" ) const ( diff --git a/auth/store.go b/auth/store.go index fa1d5b8e7..0b549abc5 100644 --- a/auth/store.go +++ b/auth/store.go @@ -16,6 +16,7 @@ package auth import ( "bytes" + "context" "encoding/binary" "errors" "sort" @@ -26,9 +27,9 @@ import ( "github.com/coreos/etcd/auth/authpb" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/pkg/capnslog" "golang.org/x/crypto/bcrypt" - "golang.org/x/net/context" "google.golang.org/grpc/credentials" "google.golang.org/grpc/metadata" "google.golang.org/grpc/peer" diff --git a/auth/store_test.go b/auth/store_test.go index f2a25aac6..951bd7b45 100644 --- a/auth/store_test.go +++ b/auth/store_test.go @@ -15,6 +15,7 @@ package auth import ( + "context" "fmt" "os" "reflect" @@ -27,7 +28,6 @@ import ( "github.com/coreos/etcd/mvcc/backend" "golang.org/x/crypto/bcrypt" - "golang.org/x/net/context" "google.golang.org/grpc/metadata" ) diff --git a/client/README.md b/client/README.md index c0ec81901..2be731ede 100644 --- a/client/README.md +++ b/client/README.md @@ -25,8 +25,8 @@ package main import ( "log" "time" + "context" - "golang.org/x/net/context" "github.com/coreos/etcd/client" ) diff --git a/client/auth_role.go b/client/auth_role.go index d15e00dd7..b6ba7e150 100644 --- a/client/auth_role.go +++ b/client/auth_role.go @@ -16,11 +16,10 @@ package client import ( "bytes" + "context" "encoding/json" "net/http" "net/url" - - "golang.org/x/net/context" ) type Role struct { diff --git a/client/auth_user.go b/client/auth_user.go index 97c3f3181..8e7e2efe8 100644 --- a/client/auth_user.go +++ b/client/auth_user.go @@ -16,12 +16,11 @@ package client import ( "bytes" + "context" "encoding/json" "net/http" "net/url" "path" - - "golang.org/x/net/context" ) var ( diff --git a/client/client.go b/client/client.go index 498dfbcc8..03054150c 100644 --- a/client/client.go +++ b/client/client.go @@ -15,6 +15,7 @@ package client import ( + "context" "encoding/json" "errors" "fmt" @@ -29,8 +30,6 @@ import ( "time" "github.com/coreos/etcd/version" - - "golang.org/x/net/context" ) var ( diff --git a/client/client_test.go b/client/client_test.go index 4ab54d883..0a355c5e4 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -15,6 +15,7 @@ package client import ( + "context" "errors" "io" "io/ioutil" @@ -29,7 +30,6 @@ import ( "github.com/coreos/etcd/pkg/testutil" "github.com/coreos/etcd/version" - "golang.org/x/net/context" ) type actionAssertingHTTPClient struct { diff --git a/client/doc.go b/client/doc.go index dd336d188..ad4eca4e1 100644 --- a/client/doc.go +++ b/client/doc.go @@ -19,9 +19,9 @@ Create a Config and exchange it for a Client: import ( "net/http" + "context" "github.com/coreos/etcd/client" - "golang.org/x/net/context" ) cfg := client.Config{ diff --git a/client/example_keys_test.go b/client/example_keys_test.go index 105a74791..66063571d 100644 --- a/client/example_keys_test.go +++ b/client/example_keys_test.go @@ -15,12 +15,12 @@ package client_test import ( + "context" "fmt" "log" "sort" "github.com/coreos/etcd/client" - "golang.org/x/net/context" ) func ExampleKeysAPI_directory() { diff --git a/client/integration/client_test.go b/client/integration/client_test.go index 490990b65..5d4d0a05e 100644 --- a/client/integration/client_test.go +++ b/client/integration/client_test.go @@ -15,6 +15,7 @@ package integration import ( + "context" "fmt" "net/http" "net/http/httptest" @@ -23,8 +24,6 @@ import ( "sync/atomic" "testing" - "golang.org/x/net/context" - "github.com/coreos/etcd/client" "github.com/coreos/etcd/integration" "github.com/coreos/etcd/pkg/testutil" diff --git a/client/keys.go b/client/keys.go index 4a6c41a78..e8373b945 100644 --- a/client/keys.go +++ b/client/keys.go @@ -17,6 +17,7 @@ package client //go:generate codecgen -d 1819 -r "Node|Response|Nodes" -o keys.generated.go keys.go import ( + "context" "encoding/json" "errors" "fmt" @@ -28,7 +29,6 @@ import ( "github.com/coreos/etcd/pkg/pathutil" "github.com/ugorji/go/codec" - "golang.org/x/net/context" ) const ( diff --git a/client/keys_test.go b/client/keys_test.go index 253fa9b8f..0e190cf59 100644 --- a/client/keys_test.go +++ b/client/keys_test.go @@ -15,6 +15,7 @@ package client import ( + "context" "errors" "fmt" "io/ioutil" @@ -23,8 +24,6 @@ import ( "reflect" "testing" "time" - - "golang.org/x/net/context" ) func TestV2KeysURLHelper(t *testing.T) { diff --git a/client/members.go b/client/members.go index 205489560..aafa3d1b8 100644 --- a/client/members.go +++ b/client/members.go @@ -16,14 +16,13 @@ package client import ( "bytes" + "context" "encoding/json" "fmt" "net/http" "net/url" "path" - "golang.org/x/net/context" - "github.com/coreos/etcd/pkg/types" ) diff --git a/client/members_test.go b/client/members_test.go index f199db2cb..706b6aeb8 100644 --- a/client/members_test.go +++ b/client/members_test.go @@ -15,6 +15,7 @@ package client import ( + "context" "encoding/json" "errors" "net/http" @@ -22,8 +23,6 @@ import ( "reflect" "testing" - "golang.org/x/net/context" - "github.com/coreos/etcd/pkg/types" ) diff --git a/clientv3/auth.go b/clientv3/auth.go index 18f1f5b09..a6ab46841 100644 --- a/clientv3/auth.go +++ b/clientv3/auth.go @@ -15,12 +15,13 @@ package clientv3 import ( + "context" "fmt" "strings" "github.com/coreos/etcd/auth/authpb" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" + "google.golang.org/grpc" ) diff --git a/clientv3/balancer.go b/clientv3/balancer.go index e27958cf3..83b4d1aaa 100644 --- a/clientv3/balancer.go +++ b/clientv3/balancer.go @@ -15,11 +15,11 @@ package clientv3 import ( + "context" "net/url" "strings" "sync" - "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/codes" ) diff --git a/clientv3/balancer_test.go b/clientv3/balancer_test.go index 5245b69a2..cffa5d417 100644 --- a/clientv3/balancer_test.go +++ b/clientv3/balancer_test.go @@ -15,6 +15,7 @@ package clientv3 import ( + "context" "errors" "net" "sync" @@ -24,7 +25,6 @@ import ( pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/pkg/testutil" - "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/clientv3/client.go b/clientv3/client.go index fb2e0ce9a..2f56d511e 100644 --- a/clientv3/client.go +++ b/clientv3/client.go @@ -15,6 +15,7 @@ package clientv3 import ( + "context" "crypto/tls" "errors" "fmt" @@ -27,7 +28,6 @@ import ( "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" - "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials" diff --git a/clientv3/client_test.go b/clientv3/client_test.go index 400fc627a..d09e64330 100644 --- a/clientv3/client_test.go +++ b/clientv3/client_test.go @@ -15,6 +15,7 @@ package clientv3 import ( + "context" "fmt" "net" "testing" @@ -22,7 +23,6 @@ import ( "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" "github.com/coreos/etcd/pkg/testutil" - "golang.org/x/net/context" ) func TestDialCancel(t *testing.T) { diff --git a/clientv3/cluster.go b/clientv3/cluster.go index 922d900e3..bbecaaca7 100644 --- a/clientv3/cluster.go +++ b/clientv3/cluster.go @@ -15,8 +15,9 @@ package clientv3 import ( + "context" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/clientv3/concurrency/election.go b/clientv3/concurrency/election.go index 05628db07..1a6bbfc90 100644 --- a/clientv3/concurrency/election.go +++ b/clientv3/concurrency/election.go @@ -15,13 +15,13 @@ package concurrency import ( + "context" "errors" "fmt" v3 "github.com/coreos/etcd/clientv3" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/mvcc/mvccpb" - "golang.org/x/net/context" ) var ( diff --git a/clientv3/concurrency/key.go b/clientv3/concurrency/key.go index cf006d70e..4b6e399bd 100644 --- a/clientv3/concurrency/key.go +++ b/clientv3/concurrency/key.go @@ -15,12 +15,12 @@ package concurrency import ( + "context" "fmt" v3 "github.com/coreos/etcd/clientv3" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/mvcc/mvccpb" - "golang.org/x/net/context" ) func waitDelete(ctx context.Context, client *v3.Client, key string, rev int64) error { diff --git a/clientv3/concurrency/mutex.go b/clientv3/concurrency/mutex.go index 83df27c79..dac9ba5a2 100644 --- a/clientv3/concurrency/mutex.go +++ b/clientv3/concurrency/mutex.go @@ -15,12 +15,12 @@ package concurrency import ( + "context" "fmt" "sync" v3 "github.com/coreos/etcd/clientv3" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" ) // Mutex implements the sync Locker interface with etcd diff --git a/clientv3/concurrency/session.go b/clientv3/concurrency/session.go index 0cb5ea7cf..7e2ff89b4 100644 --- a/clientv3/concurrency/session.go +++ b/clientv3/concurrency/session.go @@ -15,10 +15,10 @@ package concurrency import ( + "context" "time" v3 "github.com/coreos/etcd/clientv3" - "golang.org/x/net/context" ) const defaultSessionTTL = 60 diff --git a/clientv3/concurrency/stm.go b/clientv3/concurrency/stm.go index 9b6576f68..d11023ebe 100644 --- a/clientv3/concurrency/stm.go +++ b/clientv3/concurrency/stm.go @@ -15,10 +15,10 @@ package concurrency import ( + "context" "math" v3 "github.com/coreos/etcd/clientv3" - "golang.org/x/net/context" ) // STM is an interface for software transactional memory. diff --git a/clientv3/config.go b/clientv3/config.go index ccf7445c7..87d61cf57 100644 --- a/clientv3/config.go +++ b/clientv3/config.go @@ -15,10 +15,10 @@ package clientv3 import ( + "context" "crypto/tls" "time" - "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/clientv3/example_auth_test.go b/clientv3/example_auth_test.go index f07e5095c..8200df998 100644 --- a/clientv3/example_auth_test.go +++ b/clientv3/example_auth_test.go @@ -15,11 +15,11 @@ package clientv3_test import ( + "context" "fmt" "log" "github.com/coreos/etcd/clientv3" - "golang.org/x/net/context" ) func ExampleAuth() { diff --git a/clientv3/example_cluster_test.go b/clientv3/example_cluster_test.go index e9e516ba9..5aa03fd65 100644 --- a/clientv3/example_cluster_test.go +++ b/clientv3/example_cluster_test.go @@ -15,11 +15,11 @@ package clientv3_test import ( + "context" "fmt" "log" "github.com/coreos/etcd/clientv3" - "golang.org/x/net/context" ) func ExampleCluster_memberList() { diff --git a/clientv3/example_kv_test.go b/clientv3/example_kv_test.go index bd153797a..e2476e3e7 100644 --- a/clientv3/example_kv_test.go +++ b/clientv3/example_kv_test.go @@ -15,12 +15,12 @@ package clientv3_test import ( + "context" "fmt" "log" "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" - "golang.org/x/net/context" ) func ExampleKV_put() { diff --git a/clientv3/example_lease_test.go b/clientv3/example_lease_test.go index e1bd57a15..98db148b9 100644 --- a/clientv3/example_lease_test.go +++ b/clientv3/example_lease_test.go @@ -15,11 +15,11 @@ package clientv3_test import ( + "context" "fmt" "log" "github.com/coreos/etcd/clientv3" - "golang.org/x/net/context" ) func ExampleLease_grant() { diff --git a/clientv3/example_maintenence_test.go b/clientv3/example_maintenence_test.go index 6e128276f..a66a23abc 100644 --- a/clientv3/example_maintenence_test.go +++ b/clientv3/example_maintenence_test.go @@ -15,11 +15,10 @@ package clientv3_test import ( + "context" "fmt" "log" - "golang.org/x/net/context" - "github.com/coreos/etcd/clientv3" ) diff --git a/clientv3/example_metrics_test.go b/clientv3/example_metrics_test.go index a7453083d..8406bfefd 100644 --- a/clientv3/example_metrics_test.go +++ b/clientv3/example_metrics_test.go @@ -15,6 +15,7 @@ package clientv3_test import ( + "context" "fmt" "io/ioutil" "log" @@ -26,7 +27,6 @@ import ( grpcprom "github.com/grpc-ecosystem/go-grpc-prometheus" "github.com/prometheus/client_golang/prometheus" - "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/clientv3/example_test.go b/clientv3/example_test.go index 4e9b5042d..e9987b339 100644 --- a/clientv3/example_test.go +++ b/clientv3/example_test.go @@ -15,13 +15,13 @@ package clientv3_test import ( + "context" "log" "time" "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/pkg/transport" "github.com/coreos/pkg/capnslog" - "golang.org/x/net/context" ) var ( diff --git a/clientv3/example_watch_test.go b/clientv3/example_watch_test.go index b3a0f1dd2..08c199b38 100644 --- a/clientv3/example_watch_test.go +++ b/clientv3/example_watch_test.go @@ -15,11 +15,11 @@ package clientv3_test import ( + "context" "fmt" "log" "github.com/coreos/etcd/clientv3" - "golang.org/x/net/context" ) func ExampleWatcher_watch() { diff --git a/clientv3/integration/cluster_test.go b/clientv3/integration/cluster_test.go index 6397f8a8a..6abe0c513 100644 --- a/clientv3/integration/cluster_test.go +++ b/clientv3/integration/cluster_test.go @@ -15,13 +15,13 @@ package integration import ( + "context" "reflect" "testing" "github.com/coreos/etcd/integration" "github.com/coreos/etcd/pkg/testutil" "github.com/coreos/etcd/pkg/types" - "golang.org/x/net/context" ) func TestMemberList(t *testing.T) { diff --git a/clientv3/integration/dial_test.go b/clientv3/integration/dial_test.go index abe5ebe61..ec69900b6 100644 --- a/clientv3/integration/dial_test.go +++ b/clientv3/integration/dial_test.go @@ -15,6 +15,7 @@ package integration import ( + "context" "math/rand" "strings" "testing" @@ -25,8 +26,6 @@ import ( "github.com/coreos/etcd/integration" "github.com/coreos/etcd/pkg/testutil" "github.com/coreos/etcd/pkg/transport" - - "golang.org/x/net/context" ) var ( diff --git a/clientv3/integration/kv_test.go b/clientv3/integration/kv_test.go index 90dde1aa3..f5feb0aae 100644 --- a/clientv3/integration/kv_test.go +++ b/clientv3/integration/kv_test.go @@ -16,6 +16,7 @@ package integration import ( "bytes" + "context" "math/rand" "os" "reflect" @@ -28,7 +29,7 @@ import ( "github.com/coreos/etcd/integration" "github.com/coreos/etcd/mvcc/mvccpb" "github.com/coreos/etcd/pkg/testutil" - "golang.org/x/net/context" + "google.golang.org/grpc" ) diff --git a/clientv3/integration/lease_test.go b/clientv3/integration/lease_test.go index 320785205..360806ef8 100644 --- a/clientv3/integration/lease_test.go +++ b/clientv3/integration/lease_test.go @@ -15,6 +15,7 @@ package integration import ( + "context" "reflect" "sort" "sync" @@ -26,7 +27,7 @@ import ( "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" "github.com/coreos/etcd/integration" "github.com/coreos/etcd/pkg/testutil" - "golang.org/x/net/context" + "google.golang.org/grpc" ) diff --git a/clientv3/integration/metrics_test.go b/clientv3/integration/metrics_test.go index 6311fe0d7..54ca206da 100644 --- a/clientv3/integration/metrics_test.go +++ b/clientv3/integration/metrics_test.go @@ -16,6 +16,7 @@ package integration import ( "bufio" + "context" "io" "net" "net/http" @@ -31,7 +32,6 @@ import ( grpcprom "github.com/grpc-ecosystem/go-grpc-prometheus" "github.com/prometheus/client_golang/prometheus" - "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/clientv3/integration/mirror_test.go b/clientv3/integration/mirror_test.go index df9911efb..01bfef10a 100644 --- a/clientv3/integration/mirror_test.go +++ b/clientv3/integration/mirror_test.go @@ -15,6 +15,7 @@ package integration import ( + "context" "fmt" "reflect" "sync" @@ -25,7 +26,6 @@ import ( "github.com/coreos/etcd/integration" "github.com/coreos/etcd/mvcc/mvccpb" "github.com/coreos/etcd/pkg/testutil" - "golang.org/x/net/context" ) func TestMirrorSync(t *testing.T) { diff --git a/clientv3/integration/role_test.go b/clientv3/integration/role_test.go index 7814db5eb..5b4fad43c 100644 --- a/clientv3/integration/role_test.go +++ b/clientv3/integration/role_test.go @@ -15,12 +15,12 @@ package integration import ( + "context" "testing" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" "github.com/coreos/etcd/integration" "github.com/coreos/etcd/pkg/testutil" - "golang.org/x/net/context" ) func TestRoleError(t *testing.T) { diff --git a/clientv3/integration/txn_test.go b/clientv3/integration/txn_test.go index e895b5b62..313f0033b 100644 --- a/clientv3/integration/txn_test.go +++ b/clientv3/integration/txn_test.go @@ -15,6 +15,7 @@ package integration import ( + "context" "fmt" "testing" "time" @@ -24,7 +25,6 @@ import ( "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" "github.com/coreos/etcd/integration" "github.com/coreos/etcd/pkg/testutil" - "golang.org/x/net/context" ) func TestTxnError(t *testing.T) { diff --git a/clientv3/integration/user_test.go b/clientv3/integration/user_test.go index 5d8f7263b..11548123d 100644 --- a/clientv3/integration/user_test.go +++ b/clientv3/integration/user_test.go @@ -15,13 +15,13 @@ package integration import ( + "context" "testing" "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" "github.com/coreos/etcd/integration" "github.com/coreos/etcd/pkg/testutil" - "golang.org/x/net/context" ) func TestUserError(t *testing.T) { diff --git a/clientv3/integration/watch_test.go b/clientv3/integration/watch_test.go index 0de3faef3..30d166eff 100644 --- a/clientv3/integration/watch_test.go +++ b/clientv3/integration/watch_test.go @@ -15,6 +15,7 @@ package integration import ( + "context" "fmt" "math/rand" "reflect" @@ -28,7 +29,7 @@ import ( "github.com/coreos/etcd/integration" mvccpb "github.com/coreos/etcd/mvcc/mvccpb" "github.com/coreos/etcd/pkg/testutil" - "golang.org/x/net/context" + "google.golang.org/grpc" "google.golang.org/grpc/metadata" ) diff --git a/clientv3/kv.go b/clientv3/kv.go index b0557aa29..ead08a082 100644 --- a/clientv3/kv.go +++ b/clientv3/kv.go @@ -15,8 +15,10 @@ package clientv3 import ( + "context" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" + "google.golang.org/grpc" ) diff --git a/clientv3/lease.go b/clientv3/lease.go index 3e6877942..e476db5be 100644 --- a/clientv3/lease.go +++ b/clientv3/lease.go @@ -15,12 +15,13 @@ package clientv3 import ( + "context" "sync" "time" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" + "google.golang.org/grpc" "google.golang.org/grpc/metadata" ) diff --git a/clientv3/leasing/cache.go b/clientv3/leasing/cache.go index 7d47c94a3..6903a785c 100644 --- a/clientv3/leasing/cache.go +++ b/clientv3/leasing/cache.go @@ -15,6 +15,7 @@ package leasing import ( + "context" "strings" "sync" "time" @@ -22,7 +23,6 @@ import ( v3 "github.com/coreos/etcd/clientv3" v3pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/mvcc/mvccpb" - "golang.org/x/net/context" ) const revokeBackoff = 2 * time.Second diff --git a/clientv3/leasing/kv.go b/clientv3/leasing/kv.go index 91a7d85c7..39b38bd40 100644 --- a/clientv3/leasing/kv.go +++ b/clientv3/leasing/kv.go @@ -15,6 +15,7 @@ package leasing import ( + "context" "strings" "sync" "time" @@ -25,7 +26,6 @@ import ( pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/mvcc/mvccpb" - "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/codes" ) diff --git a/clientv3/maintenance.go b/clientv3/maintenance.go index 4752dc607..988a5f7c2 100644 --- a/clientv3/maintenance.go +++ b/clientv3/maintenance.go @@ -15,11 +15,11 @@ package clientv3 import ( + "context" "io" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/clientv3/mirror/syncer.go b/clientv3/mirror/syncer.go index f2a8f107f..b82093322 100644 --- a/clientv3/mirror/syncer.go +++ b/clientv3/mirror/syncer.go @@ -16,8 +16,9 @@ package mirror import ( + "context" + "github.com/coreos/etcd/clientv3" - "golang.org/x/net/context" ) const ( diff --git a/clientv3/namespace/kv.go b/clientv3/namespace/kv.go index b5ec5e964..f8c900891 100644 --- a/clientv3/namespace/kv.go +++ b/clientv3/namespace/kv.go @@ -15,7 +15,7 @@ package namespace import ( - "golang.org/x/net/context" + "context" "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" diff --git a/clientv3/namespace/lease.go b/clientv3/namespace/lease.go index fc7c22869..f092106cb 100644 --- a/clientv3/namespace/lease.go +++ b/clientv3/namespace/lease.go @@ -16,8 +16,7 @@ package namespace import ( "bytes" - - "golang.org/x/net/context" + "context" "github.com/coreos/etcd/clientv3" ) diff --git a/clientv3/namespace/watch.go b/clientv3/namespace/watch.go index 6257e2968..5a9596df5 100644 --- a/clientv3/namespace/watch.go +++ b/clientv3/namespace/watch.go @@ -15,10 +15,9 @@ package namespace import ( + "context" "sync" - "golang.org/x/net/context" - "github.com/coreos/etcd/clientv3" ) diff --git a/clientv3/naming/grpc.go b/clientv3/naming/grpc.go index 9bb92ea61..327d9f644 100644 --- a/clientv3/naming/grpc.go +++ b/clientv3/naming/grpc.go @@ -15,11 +15,11 @@ package naming import ( + "context" "encoding/json" "fmt" etcd "github.com/coreos/etcd/clientv3" - "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/codes" diff --git a/clientv3/naming/grpc_test.go b/clientv3/naming/grpc_test.go index 5a463f648..ba53666a9 100644 --- a/clientv3/naming/grpc_test.go +++ b/clientv3/naming/grpc_test.go @@ -15,16 +15,16 @@ package naming import ( + "context" "encoding/json" "reflect" "testing" - "golang.org/x/net/context" - "google.golang.org/grpc/naming" - etcd "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/integration" "github.com/coreos/etcd/pkg/testutil" + + "google.golang.org/grpc/naming" ) func TestGRPCResolver(t *testing.T) { diff --git a/clientv3/ordering/kv.go b/clientv3/ordering/kv.go index 0001ce013..e8bf07b8c 100644 --- a/clientv3/ordering/kv.go +++ b/clientv3/ordering/kv.go @@ -15,10 +15,10 @@ package ordering import ( + "context" "sync" "github.com/coreos/etcd/clientv3" - "golang.org/x/net/context" ) // kvOrdering ensures that serialized requests do not return diff --git a/clientv3/ordering/kv_test.go b/clientv3/ordering/kv_test.go index d6ec597b6..5c68cc787 100644 --- a/clientv3/ordering/kv_test.go +++ b/clientv3/ordering/kv_test.go @@ -16,6 +16,7 @@ package ordering import ( "context" + gContext "context" "errors" "sync" "testing" @@ -25,7 +26,6 @@ import ( pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/integration" "github.com/coreos/etcd/pkg/testutil" - gContext "golang.org/x/net/context" ) func TestDetectKvOrderViolation(t *testing.T) { diff --git a/clientv3/retry.go b/clientv3/retry.go index b4b8b3d38..a5d748c24 100644 --- a/clientv3/retry.go +++ b/clientv3/retry.go @@ -15,9 +15,11 @@ package clientv3 import ( + "context" + "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" + "google.golang.org/grpc" "google.golang.org/grpc/codes" ) diff --git a/clientv3/txn.go b/clientv3/txn.go index 0d9e04fcc..ea4ec6160 100644 --- a/clientv3/txn.go +++ b/clientv3/txn.go @@ -15,10 +15,11 @@ package clientv3 import ( + "context" "sync" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" + "google.golang.org/grpc" ) diff --git a/clientv3/watch.go b/clientv3/watch.go index d000c9951..cfa478126 100644 --- a/clientv3/watch.go +++ b/clientv3/watch.go @@ -15,6 +15,7 @@ package clientv3 import ( + "context" "fmt" "sync" "time" @@ -22,7 +23,7 @@ import ( v3rpc "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" mvccpb "github.com/coreos/etcd/mvcc/mvccpb" - "golang.org/x/net/context" + "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" diff --git a/compactor/compactor.go b/compactor/compactor.go index e25fd7e41..5a83d13f8 100644 --- a/compactor/compactor.go +++ b/compactor/compactor.go @@ -15,13 +15,13 @@ package compactor import ( + "context" "fmt" "time" - "github.com/coreos/pkg/capnslog" - "golang.org/x/net/context" - pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + + "github.com/coreos/pkg/capnslog" ) var ( diff --git a/compactor/compactor_test.go b/compactor/compactor_test.go index c38ef4b2e..c3db1c1f8 100644 --- a/compactor/compactor_test.go +++ b/compactor/compactor_test.go @@ -15,11 +15,11 @@ package compactor import ( + "context" "sync/atomic" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/pkg/testutil" - "golang.org/x/net/context" ) type fakeCompactable struct { diff --git a/compactor/periodic.go b/compactor/periodic.go index 7eb7cf7a8..784cef7c1 100644 --- a/compactor/periodic.go +++ b/compactor/periodic.go @@ -15,14 +15,14 @@ package compactor import ( + "context" "sync" "time" - "github.com/jonboulle/clockwork" - "golang.org/x/net/context" - pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/mvcc" + + "github.com/jonboulle/clockwork" ) // Periodic compacts the log by purging revisions older than diff --git a/compactor/revision.go b/compactor/revision.go index fd80c278d..14baec970 100644 --- a/compactor/revision.go +++ b/compactor/revision.go @@ -15,13 +15,13 @@ package compactor import ( + "context" "sync" - "github.com/jonboulle/clockwork" - "golang.org/x/net/context" - pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/mvcc" + + "github.com/jonboulle/clockwork" ) // Revision compacts the log by purging revisions older than diff --git a/contrib/raftexample/raft.go b/contrib/raftexample/raft.go index b212dcb7c..b50c5d008 100644 --- a/contrib/raftexample/raft.go +++ b/contrib/raftexample/raft.go @@ -15,15 +15,15 @@ package main import ( + "context" "fmt" "log" + "net/http" + "net/url" "os" "strconv" "time" - "net/http" - "net/url" - "github.com/coreos/etcd/etcdserver/stats" "github.com/coreos/etcd/pkg/fileutil" "github.com/coreos/etcd/pkg/types" @@ -33,7 +33,6 @@ import ( "github.com/coreos/etcd/snap" "github.com/coreos/etcd/wal" "github.com/coreos/etcd/wal/walpb" - "golang.org/x/net/context" ) // A key-value stream backed by raft diff --git a/contrib/recipes/barrier.go b/contrib/recipes/barrier.go index 33aedf6c5..6e9281721 100644 --- a/contrib/recipes/barrier.go +++ b/contrib/recipes/barrier.go @@ -15,9 +15,10 @@ package recipe import ( + "context" + v3 "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/mvcc/mvccpb" - "golang.org/x/net/context" ) // Barrier creates a key in etcd to block processes, then deletes the key to diff --git a/contrib/recipes/client.go b/contrib/recipes/client.go index 30d7389c9..111b0b40c 100644 --- a/contrib/recipes/client.go +++ b/contrib/recipes/client.go @@ -15,11 +15,11 @@ package recipe import ( + "context" "errors" v3 "github.com/coreos/etcd/clientv3" spb "github.com/coreos/etcd/mvcc/mvccpb" - "golang.org/x/net/context" ) var ( diff --git a/contrib/recipes/double_barrier.go b/contrib/recipes/double_barrier.go index 7690ba1d4..93cc61b4f 100644 --- a/contrib/recipes/double_barrier.go +++ b/contrib/recipes/double_barrier.go @@ -15,10 +15,11 @@ package recipe import ( + "context" + "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3/concurrency" "github.com/coreos/etcd/mvcc/mvccpb" - "golang.org/x/net/context" ) // DoubleBarrier blocks processes on Enter until an expected count enters, then diff --git a/contrib/recipes/key.go b/contrib/recipes/key.go index b6df53235..aea00059a 100644 --- a/contrib/recipes/key.go +++ b/contrib/recipes/key.go @@ -15,13 +15,13 @@ package recipe import ( + "context" "fmt" "strings" "time" v3 "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3/concurrency" - "golang.org/x/net/context" ) // RemoteKV is a key/revision pair created by the client and stored on etcd diff --git a/contrib/recipes/priority_queue.go b/contrib/recipes/priority_queue.go index a62fb02af..2378ce2f8 100644 --- a/contrib/recipes/priority_queue.go +++ b/contrib/recipes/priority_queue.go @@ -15,11 +15,11 @@ package recipe import ( + "context" "fmt" v3 "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/mvcc/mvccpb" - "golang.org/x/net/context" ) // PriorityQueue implements a multi-reader, multi-writer distributed queue. diff --git a/contrib/recipes/queue.go b/contrib/recipes/queue.go index 714c40604..5d0423a42 100644 --- a/contrib/recipes/queue.go +++ b/contrib/recipes/queue.go @@ -15,9 +15,10 @@ package recipe import ( + "context" + v3 "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/mvcc/mvccpb" - "golang.org/x/net/context" ) // Queue implements a multi-reader, multi-writer distributed queue. diff --git a/contrib/recipes/rwmutex.go b/contrib/recipes/rwmutex.go index 2714305df..1213b7e42 100644 --- a/contrib/recipes/rwmutex.go +++ b/contrib/recipes/rwmutex.go @@ -15,10 +15,11 @@ package recipe import ( + "context" + v3 "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3/concurrency" "github.com/coreos/etcd/mvcc/mvccpb" - "golang.org/x/net/context" ) type RWMutex struct { diff --git a/contrib/recipes/watch.go b/contrib/recipes/watch.go index 1c4619d33..536787227 100644 --- a/contrib/recipes/watch.go +++ b/contrib/recipes/watch.go @@ -15,9 +15,10 @@ package recipe import ( + "context" + "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/mvcc/mvccpb" - "golang.org/x/net/context" ) // WaitEvents waits on a key until it observes the given events and returns the final one. diff --git a/discovery/discovery.go b/discovery/discovery.go index edc842ffb..7d1fa0d05 100644 --- a/discovery/discovery.go +++ b/discovery/discovery.go @@ -17,6 +17,7 @@ package discovery import ( + "context" "errors" "fmt" "math" @@ -31,9 +32,9 @@ import ( "github.com/coreos/etcd/client" "github.com/coreos/etcd/pkg/transport" "github.com/coreos/etcd/pkg/types" + "github.com/coreos/pkg/capnslog" "github.com/jonboulle/clockwork" - "golang.org/x/net/context" ) var ( diff --git a/discovery/discovery_test.go b/discovery/discovery_test.go index bf0636af8..89897266f 100644 --- a/discovery/discovery_test.go +++ b/discovery/discovery_test.go @@ -15,6 +15,7 @@ package discovery import ( + "context" "errors" "math" "math/rand" @@ -25,10 +26,9 @@ import ( "testing" "time" - "github.com/jonboulle/clockwork" - "golang.org/x/net/context" - "github.com/coreos/etcd/client" + + "github.com/jonboulle/clockwork" ) const ( diff --git a/e2e/ctl_v3_alarm_test.go b/e2e/ctl_v3_alarm_test.go index 912620e81..395ac297a 100644 --- a/e2e/ctl_v3_alarm_test.go +++ b/e2e/ctl_v3_alarm_test.go @@ -15,13 +15,13 @@ package e2e import ( + "context" "os" "strings" "testing" "time" "github.com/coreos/etcd/clientv3" - "golang.org/x/net/context" ) func TestCtlV3Alarm(t *testing.T) { diff --git a/e2e/ctl_v3_migrate_test.go b/e2e/ctl_v3_migrate_test.go index 7252fe0a3..1bad8c439 100644 --- a/e2e/ctl_v3_migrate_test.go +++ b/e2e/ctl_v3_migrate_test.go @@ -15,13 +15,12 @@ package e2e import ( + "context" "fmt" "os" "testing" "time" - "golang.org/x/net/context" - "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/pkg/testutil" ) diff --git a/embed/serve.go b/embed/serve.go index 6af237432..501d5f253 100644 --- a/embed/serve.go +++ b/embed/serve.go @@ -15,6 +15,7 @@ package embed import ( + "context" "io/ioutil" defaultLog "log" "net" @@ -36,7 +37,6 @@ import ( gw "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/soheilhy/cmux" - "golang.org/x/net/context" "golang.org/x/net/trace" "google.golang.org/grpc" "google.golang.org/grpc/credentials" diff --git a/etcdctl/ctlv2/command/cluster_health.go b/etcdctl/ctlv2/command/cluster_health.go index d1429649a..ec0bb241d 100644 --- a/etcdctl/ctlv2/command/cluster_health.go +++ b/etcdctl/ctlv2/command/cluster_health.go @@ -15,6 +15,7 @@ package command import ( + "context" "encoding/json" "fmt" "io/ioutil" @@ -24,8 +25,8 @@ import ( "time" "github.com/coreos/etcd/client" + "github.com/urfave/cli" - "golang.org/x/net/context" ) func NewClusterHealthCommand() cli.Command { diff --git a/etcdctl/ctlv2/command/exec_watch_command.go b/etcdctl/ctlv2/command/exec_watch_command.go index 5ae245245..cc3478cc3 100644 --- a/etcdctl/ctlv2/command/exec_watch_command.go +++ b/etcdctl/ctlv2/command/exec_watch_command.go @@ -15,6 +15,7 @@ package command import ( + "context" "errors" "fmt" "os" @@ -22,8 +23,8 @@ import ( "os/signal" "github.com/coreos/etcd/client" + "github.com/urfave/cli" - "golang.org/x/net/context" ) // NewExecWatchCommand returns the CLI command for "exec-watch". diff --git a/etcdctl/ctlv2/command/util.go b/etcdctl/ctlv2/command/util.go index d6a58145c..e4719d77a 100644 --- a/etcdctl/ctlv2/command/util.go +++ b/etcdctl/ctlv2/command/util.go @@ -15,6 +15,7 @@ package command import ( + "context" "errors" "fmt" "io" @@ -27,11 +28,11 @@ import ( "syscall" "time" - "github.com/bgentry/speakeasy" "github.com/coreos/etcd/client" "github.com/coreos/etcd/pkg/transport" + + "github.com/bgentry/speakeasy" "github.com/urfave/cli" - "golang.org/x/net/context" ) var ( diff --git a/etcdctl/ctlv2/command/watch_command.go b/etcdctl/ctlv2/command/watch_command.go index 71f4c014c..eac63b040 100644 --- a/etcdctl/ctlv2/command/watch_command.go +++ b/etcdctl/ctlv2/command/watch_command.go @@ -15,14 +15,15 @@ package command import ( + "context" "errors" "fmt" "os" "os/signal" "github.com/coreos/etcd/client" + "github.com/urfave/cli" - "golang.org/x/net/context" ) // NewWatchCommand returns the CLI command for "watch". diff --git a/etcdctl/ctlv3/command/elect_command.go b/etcdctl/ctlv3/command/elect_command.go index 74216f3e6..ace4f1197 100644 --- a/etcdctl/ctlv3/command/elect_command.go +++ b/etcdctl/ctlv3/command/elect_command.go @@ -15,6 +15,7 @@ package command import ( + "context" "errors" "os" "os/signal" @@ -22,8 +23,8 @@ import ( "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3/concurrency" + "github.com/spf13/cobra" - "golang.org/x/net/context" ) var ( diff --git a/etcdctl/ctlv3/command/lease_command.go b/etcdctl/ctlv3/command/lease_command.go index fe6fa3634..28c9a0ada 100644 --- a/etcdctl/ctlv3/command/lease_command.go +++ b/etcdctl/ctlv3/command/lease_command.go @@ -15,12 +15,13 @@ package command import ( + "context" "fmt" "strconv" v3 "github.com/coreos/etcd/clientv3" + "github.com/spf13/cobra" - "golang.org/x/net/context" ) // NewLeaseCommand returns the cobra command for "lease". diff --git a/etcdctl/ctlv3/command/lock_command.go b/etcdctl/ctlv3/command/lock_command.go index 13d3a7c78..74ebac81e 100644 --- a/etcdctl/ctlv3/command/lock_command.go +++ b/etcdctl/ctlv3/command/lock_command.go @@ -15,6 +15,7 @@ package command import ( + "context" "errors" "fmt" "os" @@ -24,8 +25,8 @@ import ( "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3/concurrency" + "github.com/spf13/cobra" - "golang.org/x/net/context" ) var lockTTL = 10 diff --git a/etcdctl/ctlv3/command/make_mirror_command.go b/etcdctl/ctlv3/command/make_mirror_command.go index e333c9994..502406441 100644 --- a/etcdctl/ctlv3/command/make_mirror_command.go +++ b/etcdctl/ctlv3/command/make_mirror_command.go @@ -15,6 +15,7 @@ package command import ( + "context" "errors" "fmt" "strings" @@ -25,8 +26,8 @@ import ( "github.com/coreos/etcd/clientv3/mirror" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/spf13/cobra" - "golang.org/x/net/context" ) var ( diff --git a/etcdctl/ctlv3/command/role_command.go b/etcdctl/ctlv3/command/role_command.go index b467a5632..4f062b2a5 100644 --- a/etcdctl/ctlv3/command/role_command.go +++ b/etcdctl/ctlv3/command/role_command.go @@ -15,11 +15,11 @@ package command import ( + "context" "fmt" "github.com/coreos/etcd/clientv3" "github.com/spf13/cobra" - "golang.org/x/net/context" ) var ( diff --git a/etcdctl/ctlv3/command/snapshot_command.go b/etcdctl/ctlv3/command/snapshot_command.go index db12df50a..3c59ec70c 100644 --- a/etcdctl/ctlv3/command/snapshot_command.go +++ b/etcdctl/ctlv3/command/snapshot_command.go @@ -15,6 +15,7 @@ package command import ( + "context" "crypto/sha256" "encoding/binary" "encoding/json" @@ -27,7 +28,6 @@ import ( "reflect" "strings" - bolt "github.com/coreos/bbolt" "github.com/coreos/etcd/etcdserver" "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/etcdserver/membership" @@ -42,8 +42,9 @@ import ( "github.com/coreos/etcd/store" "github.com/coreos/etcd/wal" "github.com/coreos/etcd/wal/walpb" + + bolt "github.com/coreos/bbolt" "github.com/spf13/cobra" - "golang.org/x/net/context" ) const ( diff --git a/etcdctl/ctlv3/command/txn_command.go b/etcdctl/ctlv3/command/txn_command.go index f809ec88c..eec1e0916 100644 --- a/etcdctl/ctlv3/command/txn_command.go +++ b/etcdctl/ctlv3/command/txn_command.go @@ -16,6 +16,7 @@ package command import ( "bufio" + "context" "fmt" "os" "strconv" @@ -23,8 +24,8 @@ import ( "github.com/coreos/etcd/clientv3" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/spf13/cobra" - "golang.org/x/net/context" ) var ( diff --git a/etcdctl/ctlv3/command/user_command.go b/etcdctl/ctlv3/command/user_command.go index 8a157e2a6..4df56f720 100644 --- a/etcdctl/ctlv3/command/user_command.go +++ b/etcdctl/ctlv3/command/user_command.go @@ -15,12 +15,12 @@ package command import ( + "context" "fmt" "strings" "github.com/bgentry/speakeasy" "github.com/spf13/cobra" - "golang.org/x/net/context" ) var ( diff --git a/etcdctl/ctlv3/command/util.go b/etcdctl/ctlv3/command/util.go index c9201c7be..addd023db 100644 --- a/etcdctl/ctlv3/command/util.go +++ b/etcdctl/ctlv3/command/util.go @@ -15,13 +15,14 @@ package command import ( + "context" "encoding/hex" "fmt" "regexp" pb "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/spf13/cobra" - "golang.org/x/net/context" ) func printKV(isHex bool, valueOnly bool, kv *pb.KeyValue) { diff --git a/etcdctl/ctlv3/command/watch_command.go b/etcdctl/ctlv3/command/watch_command.go index 17b670e9d..4adf547e9 100644 --- a/etcdctl/ctlv3/command/watch_command.go +++ b/etcdctl/ctlv3/command/watch_command.go @@ -16,13 +16,14 @@ package command import ( "bufio" + "context" "fmt" "os" "strings" "github.com/coreos/etcd/clientv3" + "github.com/spf13/cobra" - "golang.org/x/net/context" ) var ( diff --git a/etcdserver/api/v2http/client.go b/etcdserver/api/v2http/client.go index c9d86508e..d23375297 100644 --- a/etcdserver/api/v2http/client.go +++ b/etcdserver/api/v2http/client.go @@ -15,6 +15,7 @@ package v2http import ( + "context" "encoding/json" "errors" "fmt" @@ -37,8 +38,8 @@ import ( "github.com/coreos/etcd/etcdserver/stats" "github.com/coreos/etcd/pkg/types" "github.com/coreos/etcd/store" + "github.com/jonboulle/clockwork" - "golang.org/x/net/context" ) const ( diff --git a/etcdserver/api/v2http/client_test.go b/etcdserver/api/v2http/client_test.go index 0a58082a4..44448d0bf 100644 --- a/etcdserver/api/v2http/client_test.go +++ b/etcdserver/api/v2http/client_test.go @@ -16,6 +16,7 @@ package v2http import ( "bytes" + "context" "encoding/json" "errors" "io/ioutil" @@ -38,9 +39,9 @@ import ( "github.com/coreos/etcd/pkg/types" "github.com/coreos/etcd/raft/raftpb" "github.com/coreos/etcd/store" + "github.com/coreos/go-semver/semver" "github.com/jonboulle/clockwork" - "golang.org/x/net/context" ) func mustMarshalEvent(t *testing.T, ev *store.Event) string { diff --git a/etcdserver/api/v2http/http_test.go b/etcdserver/api/v2http/http_test.go index 5b68a49a5..e9d8dc00d 100644 --- a/etcdserver/api/v2http/http_test.go +++ b/etcdserver/api/v2http/http_test.go @@ -15,6 +15,7 @@ package v2http import ( + "context" "errors" "net/http" "net/http/httptest" @@ -27,8 +28,8 @@ import ( "github.com/coreos/etcd/etcdserver/membership" "github.com/coreos/etcd/pkg/types" "github.com/coreos/etcd/raft/raftpb" + "github.com/coreos/go-semver/semver" - "golang.org/x/net/context" ) type fakeCluster struct { diff --git a/etcdserver/api/v2v3/server.go b/etcdserver/api/v2v3/server.go index dae457ccf..2ef63ce68 100644 --- a/etcdserver/api/v2v3/server.go +++ b/etcdserver/api/v2v3/server.go @@ -15,6 +15,7 @@ package v2v3 import ( + "context" "net/http" "time" @@ -26,7 +27,6 @@ import ( "github.com/coreos/etcd/pkg/types" "github.com/coreos/go-semver/semver" - "golang.org/x/net/context" // TODO: replace with context in go1.9 ) type fakeStats struct{} diff --git a/etcdserver/api/v3client/v3client.go b/etcdserver/api/v3client/v3client.go index cc4147d2f..6f943184f 100644 --- a/etcdserver/api/v3client/v3client.go +++ b/etcdserver/api/v3client/v3client.go @@ -15,14 +15,13 @@ package v3client import ( + "context" "time" "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/etcdserver" "github.com/coreos/etcd/etcdserver/api/v3rpc" "github.com/coreos/etcd/proxy/grpcproxy/adapter" - - "golang.org/x/net/context" ) // New creates a clientv3 client that wraps an in-process EtcdServer. Instead diff --git a/etcdserver/api/v3election/election.go b/etcdserver/api/v3election/election.go index f9061c079..51e181446 100644 --- a/etcdserver/api/v3election/election.go +++ b/etcdserver/api/v3election/election.go @@ -15,7 +15,7 @@ package v3election import ( - "golang.org/x/net/context" + "context" "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3/concurrency" diff --git a/etcdserver/api/v3lock/lock.go b/etcdserver/api/v3lock/lock.go index 66465bf13..a5efcbab5 100644 --- a/etcdserver/api/v3lock/lock.go +++ b/etcdserver/api/v3lock/lock.go @@ -15,7 +15,7 @@ package v3lock import ( - "golang.org/x/net/context" + "context" "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3/concurrency" diff --git a/etcdserver/api/v3rpc/auth.go b/etcdserver/api/v3rpc/auth.go index e66c5261d..ca8e53ad0 100644 --- a/etcdserver/api/v3rpc/auth.go +++ b/etcdserver/api/v3rpc/auth.go @@ -15,9 +15,10 @@ package v3rpc import ( + "context" + "github.com/coreos/etcd/etcdserver" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" ) type AuthServer struct { diff --git a/etcdserver/api/v3rpc/interceptor.go b/etcdserver/api/v3rpc/interceptor.go index de9470a89..f38dc4a99 100644 --- a/etcdserver/api/v3rpc/interceptor.go +++ b/etcdserver/api/v3rpc/interceptor.go @@ -15,6 +15,7 @@ package v3rpc import ( + "context" "sync" "time" @@ -25,7 +26,6 @@ import ( "github.com/coreos/etcd/raft" prometheus "github.com/grpc-ecosystem/go-grpc-prometheus" - "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/metadata" ) diff --git a/etcdserver/api/v3rpc/key.go b/etcdserver/api/v3rpc/key.go index 973346592..9781bddda 100644 --- a/etcdserver/api/v3rpc/key.go +++ b/etcdserver/api/v3rpc/key.go @@ -16,12 +16,14 @@ package v3rpc import ( + "context" + "github.com/coreos/etcd/etcdserver" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/pkg/adt" + "github.com/coreos/pkg/capnslog" - "golang.org/x/net/context" ) var ( diff --git a/etcdserver/api/v3rpc/lease.go b/etcdserver/api/v3rpc/lease.go index 6c267da75..7b5e17ca2 100644 --- a/etcdserver/api/v3rpc/lease.go +++ b/etcdserver/api/v3rpc/lease.go @@ -15,13 +15,13 @@ package v3rpc import ( + "context" "io" "github.com/coreos/etcd/etcdserver" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/lease" - "golang.org/x/net/context" ) type LeaseServer struct { diff --git a/etcdserver/api/v3rpc/maintenance.go b/etcdserver/api/v3rpc/maintenance.go index a88aec995..c9df1800d 100644 --- a/etcdserver/api/v3rpc/maintenance.go +++ b/etcdserver/api/v3rpc/maintenance.go @@ -15,6 +15,7 @@ package v3rpc import ( + "context" "crypto/sha256" "io" @@ -26,7 +27,6 @@ import ( "github.com/coreos/etcd/mvcc/backend" "github.com/coreos/etcd/pkg/types" "github.com/coreos/etcd/version" - "golang.org/x/net/context" ) type KVGetter interface { diff --git a/etcdserver/api/v3rpc/member.go b/etcdserver/api/v3rpc/member.go index ff271e8dd..cbe7b470a 100644 --- a/etcdserver/api/v3rpc/member.go +++ b/etcdserver/api/v3rpc/member.go @@ -15,6 +15,7 @@ package v3rpc import ( + "context" "time" "github.com/coreos/etcd/etcdserver" @@ -23,7 +24,6 @@ import ( pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/etcdserver/membership" "github.com/coreos/etcd/pkg/types" - "golang.org/x/net/context" ) type ClusterServer struct { diff --git a/etcdserver/api/v3rpc/quota.go b/etcdserver/api/v3rpc/quota.go index 836f2fd3f..02d99609d 100644 --- a/etcdserver/api/v3rpc/quota.go +++ b/etcdserver/api/v3rpc/quota.go @@ -15,11 +15,12 @@ package v3rpc import ( + "context" + "github.com/coreos/etcd/etcdserver" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/pkg/types" - "golang.org/x/net/context" ) type quotaKVServer struct { diff --git a/etcdserver/api/v3rpc/watch.go b/etcdserver/api/v3rpc/watch.go index a456307fe..c796c3386 100644 --- a/etcdserver/api/v3rpc/watch.go +++ b/etcdserver/api/v3rpc/watch.go @@ -15,12 +15,11 @@ package v3rpc import ( + "context" "io" "sync" "time" - "golang.org/x/net/context" - "github.com/coreos/etcd/auth" "github.com/coreos/etcd/etcdserver" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" diff --git a/etcdserver/apply.go b/etcdserver/apply.go index 26b17f141..295d93714 100644 --- a/etcdserver/apply.go +++ b/etcdserver/apply.go @@ -16,6 +16,7 @@ package etcdserver import ( "bytes" + "context" "sort" "time" @@ -24,8 +25,8 @@ import ( "github.com/coreos/etcd/mvcc" "github.com/coreos/etcd/mvcc/mvccpb" "github.com/coreos/etcd/pkg/types" + "github.com/gogo/protobuf/proto" - "golang.org/x/net/context" ) const ( diff --git a/etcdserver/auth/auth.go b/etcdserver/auth/auth.go index 19e96d57c..8991675cc 100644 --- a/etcdserver/auth/auth.go +++ b/etcdserver/auth/auth.go @@ -16,6 +16,7 @@ package auth import ( + "context" "encoding/json" "fmt" "net/http" @@ -30,8 +31,8 @@ import ( "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/pkg/types" "github.com/coreos/pkg/capnslog" + "golang.org/x/crypto/bcrypt" - "golang.org/x/net/context" ) const ( diff --git a/etcdserver/auth/auth_requests.go b/etcdserver/auth/auth_requests.go index eec700acc..2464828e6 100644 --- a/etcdserver/auth/auth_requests.go +++ b/etcdserver/auth/auth_requests.go @@ -15,13 +15,13 @@ package auth import ( + "context" "encoding/json" "path" etcderr "github.com/coreos/etcd/error" "github.com/coreos/etcd/etcdserver" "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" ) func (s *store) ensureAuthDirectories() error { diff --git a/etcdserver/auth/auth_test.go b/etcdserver/auth/auth_test.go index 2d81d9246..ad32260de 100644 --- a/etcdserver/auth/auth_test.go +++ b/etcdserver/auth/auth_test.go @@ -15,6 +15,7 @@ package auth import ( + "context" "reflect" "testing" "time" @@ -23,7 +24,6 @@ import ( "github.com/coreos/etcd/etcdserver" "github.com/coreos/etcd/etcdserver/etcdserverpb" etcdstore "github.com/coreos/etcd/store" - "golang.org/x/net/context" ) type fakeDoer struct{} diff --git a/etcdserver/config.go b/etcdserver/config.go index 1e3936902..cac4fb010 100644 --- a/etcdserver/config.go +++ b/etcdserver/config.go @@ -15,14 +15,13 @@ package etcdserver import ( + "context" "fmt" "path/filepath" "sort" "strings" "time" - "golang.org/x/net/context" - "github.com/coreos/etcd/pkg/netutil" "github.com/coreos/etcd/pkg/transport" "github.com/coreos/etcd/pkg/types" diff --git a/etcdserver/corrupt.go b/etcdserver/corrupt.go index b1602de1e..ea6149543 100644 --- a/etcdserver/corrupt.go +++ b/etcdserver/corrupt.go @@ -15,14 +15,13 @@ package etcdserver import ( + "context" "time" "github.com/coreos/etcd/clientv3" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/mvcc" "github.com/coreos/etcd/pkg/types" - - "golang.org/x/net/context" ) func (s *EtcdServer) monitorKVHash() { diff --git a/etcdserver/membership/cluster.go b/etcdserver/membership/cluster.go index 2330219f1..565354402 100644 --- a/etcdserver/membership/cluster.go +++ b/etcdserver/membership/cluster.go @@ -16,6 +16,7 @@ package membership import ( "bytes" + "context" "crypto/sha1" "encoding/binary" "encoding/json" @@ -26,8 +27,6 @@ import ( "sync" "time" - "golang.org/x/net/context" - "github.com/coreos/etcd/mvcc/backend" "github.com/coreos/etcd/pkg/netutil" "github.com/coreos/etcd/pkg/types" @@ -35,6 +34,7 @@ import ( "github.com/coreos/etcd/raft/raftpb" "github.com/coreos/etcd/store" "github.com/coreos/etcd/version" + "github.com/coreos/go-semver/semver" ) diff --git a/etcdserver/server.go b/etcdserver/server.go index ffeaf88cc..20f8a7166 100644 --- a/etcdserver/server.go +++ b/etcdserver/server.go @@ -15,6 +15,7 @@ package etcdserver import ( + "context" "encoding/json" "expvar" "fmt" @@ -55,9 +56,9 @@ import ( "github.com/coreos/etcd/store" "github.com/coreos/etcd/version" "github.com/coreos/etcd/wal" + "github.com/coreos/go-semver/semver" "github.com/coreos/pkg/capnslog" - "golang.org/x/net/context" ) const ( diff --git a/etcdserver/server_test.go b/etcdserver/server_test.go index c2bd0045f..bafacad6c 100644 --- a/etcdserver/server_test.go +++ b/etcdserver/server_test.go @@ -15,6 +15,7 @@ package etcdserver import ( + "context" "encoding/json" "fmt" "io/ioutil" @@ -44,7 +45,6 @@ import ( "github.com/coreos/etcd/rafthttp" "github.com/coreos/etcd/snap" "github.com/coreos/etcd/store" - "golang.org/x/net/context" ) // TestDoLocalAction tests requests which do not need to go through raft to be applied, diff --git a/etcdserver/v2_server.go b/etcdserver/v2_server.go index 6c4aa8baf..4b027f18d 100644 --- a/etcdserver/v2_server.go +++ b/etcdserver/v2_server.go @@ -15,11 +15,11 @@ package etcdserver import ( + "context" "time" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/store" - "golang.org/x/net/context" ) type RequestV2 pb.Request diff --git a/etcdserver/v3_server.go b/etcdserver/v3_server.go index 6b80468f4..451d3de41 100644 --- a/etcdserver/v3_server.go +++ b/etcdserver/v3_server.go @@ -16,11 +16,10 @@ package etcdserver import ( "bytes" + "context" "encoding/binary" "time" - "github.com/gogo/protobuf/proto" - "github.com/coreos/etcd/auth" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/etcdserver/membership" @@ -29,7 +28,7 @@ import ( "github.com/coreos/etcd/mvcc" "github.com/coreos/etcd/raft" - "golang.org/x/net/context" + "github.com/gogo/protobuf/proto" ) const ( diff --git a/integration/cluster.go b/integration/cluster.go index 01a2aa6ad..c85eccccd 100644 --- a/integration/cluster.go +++ b/integration/cluster.go @@ -15,6 +15,7 @@ package integration import ( + "context" "crypto/tls" "fmt" "io/ioutil" @@ -31,10 +32,6 @@ import ( "testing" "time" - "github.com/soheilhy/cmux" - "golang.org/x/net/context" - "google.golang.org/grpc" - "github.com/coreos/etcd/client" "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/embed" @@ -52,7 +49,10 @@ import ( "github.com/coreos/etcd/pkg/transport" "github.com/coreos/etcd/pkg/types" "github.com/coreos/etcd/rafthttp" + "github.com/coreos/pkg/capnslog" + "github.com/soheilhy/cmux" + "google.golang.org/grpc" ) const ( diff --git a/integration/cluster_test.go b/integration/cluster_test.go index 14549dac0..e7475abaa 100644 --- a/integration/cluster_test.go +++ b/integration/cluster_test.go @@ -15,6 +15,7 @@ package integration import ( + "context" "fmt" "log" "math/rand" @@ -27,9 +28,8 @@ import ( "github.com/coreos/etcd/client" "github.com/coreos/etcd/etcdserver" "github.com/coreos/etcd/pkg/testutil" - "github.com/coreos/pkg/capnslog" - "golang.org/x/net/context" + "github.com/coreos/pkg/capnslog" ) func init() { diff --git a/integration/member_test.go b/integration/member_test.go index 501d91838..539adfec9 100644 --- a/integration/member_test.go +++ b/integration/member_test.go @@ -15,6 +15,7 @@ package integration import ( + "context" "fmt" "io/ioutil" "os" @@ -23,7 +24,6 @@ import ( "github.com/coreos/etcd/client" "github.com/coreos/etcd/pkg/testutil" - "golang.org/x/net/context" ) func TestPauseMember(t *testing.T) { diff --git a/integration/v3_alarm_test.go b/integration/v3_alarm_test.go index 9c735231d..0dbaf6b7f 100644 --- a/integration/v3_alarm_test.go +++ b/integration/v3_alarm_test.go @@ -15,6 +15,7 @@ package integration import ( + "context" "os" "path/filepath" "sync" @@ -26,7 +27,6 @@ import ( "github.com/coreos/etcd/mvcc" "github.com/coreos/etcd/mvcc/backend" "github.com/coreos/etcd/pkg/testutil" - "golang.org/x/net/context" ) // TestV3StorageQuotaApply tests the V3 server respects quotas during apply diff --git a/integration/v3_auth_test.go b/integration/v3_auth_test.go index 03ea88cd9..5d883d0c6 100644 --- a/integration/v3_auth_test.go +++ b/integration/v3_auth_test.go @@ -15,13 +15,12 @@ package integration import ( + "context" "fmt" "sync" "testing" "time" - "golang.org/x/net/context" - "github.com/coreos/etcd/auth/authpb" "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" diff --git a/integration/v3_election_test.go b/integration/v3_election_test.go index 95f5b4949..341430df5 100644 --- a/integration/v3_election_test.go +++ b/integration/v3_election_test.go @@ -15,13 +15,13 @@ package integration import ( + "context" "fmt" "testing" "time" "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3/concurrency" - "golang.org/x/net/context" ) // TestElectionWait tests if followers can correctly wait for elections. diff --git a/integration/v3_grpc_inflight_test.go b/integration/v3_grpc_inflight_test.go index 1994af06d..0c9f892a3 100644 --- a/integration/v3_grpc_inflight_test.go +++ b/integration/v3_grpc_inflight_test.go @@ -15,6 +15,7 @@ package integration import ( + "context" "sync" "testing" "time" @@ -22,7 +23,6 @@ import ( pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/pkg/testutil" - "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/integration/v3_grpc_test.go b/integration/v3_grpc_test.go index 47d4591e0..345ce762e 100644 --- a/integration/v3_grpc_test.go +++ b/integration/v3_grpc_test.go @@ -16,6 +16,7 @@ package integration import ( "bytes" + "context" "fmt" "io/ioutil" "math/rand" @@ -30,7 +31,6 @@ import ( "github.com/coreos/etcd/pkg/testutil" "github.com/coreos/etcd/pkg/transport" - "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/metadata" ) diff --git a/integration/v3_lease_test.go b/integration/v3_lease_test.go index 7ea873f86..39df1cabe 100644 --- a/integration/v3_lease_test.go +++ b/integration/v3_lease_test.go @@ -15,18 +15,18 @@ package integration import ( + "context" "fmt" "testing" "time" - "golang.org/x/net/context" - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" - "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/mvcc/mvccpb" "github.com/coreos/etcd/pkg/testutil" + + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" ) // TestV3LeasePrmote ensures the newly elected leader can promote itself diff --git a/integration/v3_lock_test.go b/integration/v3_lock_test.go index e2f37afe2..889a6ef1f 100644 --- a/integration/v3_lock_test.go +++ b/integration/v3_lock_test.go @@ -15,6 +15,7 @@ package integration import ( + "context" "math/rand" "sync" "testing" @@ -25,7 +26,6 @@ import ( "github.com/coreos/etcd/contrib/recipes" "github.com/coreos/etcd/mvcc/mvccpb" "github.com/coreos/etcd/pkg/testutil" - "golang.org/x/net/context" ) func TestMutexSingleNode(t *testing.T) { diff --git a/integration/v3_watch_test.go b/integration/v3_watch_test.go index 92fc98ef3..c91f4df65 100644 --- a/integration/v3_watch_test.go +++ b/integration/v3_watch_test.go @@ -16,6 +16,7 @@ package integration import ( "bytes" + "context" "fmt" "reflect" "sort" @@ -27,7 +28,6 @@ import ( pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/mvcc/mvccpb" "github.com/coreos/etcd/pkg/testutil" - "golang.org/x/net/context" ) // TestV3WatchFromCurrentRevision tests Watch APIs from current revision. diff --git a/integration/v3election_grpc_test.go b/integration/v3election_grpc_test.go index be320286e..12a0908b7 100644 --- a/integration/v3election_grpc_test.go +++ b/integration/v3election_grpc_test.go @@ -15,6 +15,7 @@ package integration import ( + "context" "fmt" "testing" "time" @@ -22,7 +23,6 @@ import ( epb "github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/pkg/testutil" - "golang.org/x/net/context" ) // TestV3ElectionCampaign checks that Campaign will not give diff --git a/integration/v3lock_grpc_test.go b/integration/v3lock_grpc_test.go index a66a8cf46..ccaf0a9cc 100644 --- a/integration/v3lock_grpc_test.go +++ b/integration/v3lock_grpc_test.go @@ -15,13 +15,13 @@ package integration import ( + "context" "testing" "time" lockpb "github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/pkg/testutil" - "golang.org/x/net/context" ) // TestV3LockLockWaiter tests that a client will wait for a lock, then acquire it diff --git a/lease/leasehttp/http_test.go b/lease/leasehttp/http_test.go index 413208104..367cd8e64 100644 --- a/lease/leasehttp/http_test.go +++ b/lease/leasehttp/http_test.go @@ -15,6 +15,7 @@ package leasehttp import ( + "context" "net/http" "net/http/httptest" "os" @@ -24,8 +25,6 @@ import ( "github.com/coreos/etcd/lease" "github.com/coreos/etcd/mvcc/backend" - - "golang.org/x/net/context" ) func TestRenewHTTP(t *testing.T) { diff --git a/mvcc/kvstore.go b/mvcc/kvstore.go index 9d972311a..1a695e3ab 100644 --- a/mvcc/kvstore.go +++ b/mvcc/kvstore.go @@ -15,6 +15,7 @@ package mvcc import ( + "context" "encoding/binary" "errors" "hash/crc32" @@ -28,7 +29,6 @@ import ( "github.com/coreos/etcd/mvcc/mvccpb" "github.com/coreos/etcd/pkg/schedule" "github.com/coreos/pkg/capnslog" - "golang.org/x/net/context" ) var ( diff --git a/pkg/schedule/schedule.go b/pkg/schedule/schedule.go index bf8528b75..234d01989 100644 --- a/pkg/schedule/schedule.go +++ b/pkg/schedule/schedule.go @@ -15,9 +15,8 @@ package schedule import ( + "context" "sync" - - "golang.org/x/net/context" ) type Job func(context.Context) diff --git a/pkg/schedule/schedule_test.go b/pkg/schedule/schedule_test.go index 88c5bf3c9..aa9c709f8 100644 --- a/pkg/schedule/schedule_test.go +++ b/pkg/schedule/schedule_test.go @@ -15,9 +15,8 @@ package schedule import ( + "context" "testing" - - "golang.org/x/net/context" ) func TestFIFOSchedule(t *testing.T) { diff --git a/proxy/grpcproxy/adapter/auth_client_adapter.go b/proxy/grpcproxy/adapter/auth_client_adapter.go index 7f38a9ac7..33dc91f01 100644 --- a/proxy/grpcproxy/adapter/auth_client_adapter.go +++ b/proxy/grpcproxy/adapter/auth_client_adapter.go @@ -15,8 +15,10 @@ package adapter import ( + "context" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" + grpc "google.golang.org/grpc" ) diff --git a/proxy/grpcproxy/adapter/chan_stream.go b/proxy/grpcproxy/adapter/chan_stream.go index 3aa01f205..82e341193 100644 --- a/proxy/grpcproxy/adapter/chan_stream.go +++ b/proxy/grpcproxy/adapter/chan_stream.go @@ -15,7 +15,7 @@ package adapter import ( - "golang.org/x/net/context" + "context" "google.golang.org/grpc" "google.golang.org/grpc/metadata" diff --git a/proxy/grpcproxy/adapter/cluster_client_adapter.go b/proxy/grpcproxy/adapter/cluster_client_adapter.go index 4ddf78e15..6c0340998 100644 --- a/proxy/grpcproxy/adapter/cluster_client_adapter.go +++ b/proxy/grpcproxy/adapter/cluster_client_adapter.go @@ -15,9 +15,10 @@ package adapter import ( + "context" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/proxy/grpcproxy/adapter/election_client_adapter.go b/proxy/grpcproxy/adapter/election_client_adapter.go index 383c1b9d8..a2ebf138f 100644 --- a/proxy/grpcproxy/adapter/election_client_adapter.go +++ b/proxy/grpcproxy/adapter/election_client_adapter.go @@ -15,9 +15,10 @@ package adapter import ( + "context" + "github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb" - "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/proxy/grpcproxy/adapter/kv_client_adapter.go b/proxy/grpcproxy/adapter/kv_client_adapter.go index fec401d9d..acd5673d0 100644 --- a/proxy/grpcproxy/adapter/kv_client_adapter.go +++ b/proxy/grpcproxy/adapter/kv_client_adapter.go @@ -15,8 +15,10 @@ package adapter import ( + "context" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" + grpc "google.golang.org/grpc" ) diff --git a/proxy/grpcproxy/adapter/lease_client_adapter.go b/proxy/grpcproxy/adapter/lease_client_adapter.go index c8c67ce6e..84c48b591 100644 --- a/proxy/grpcproxy/adapter/lease_client_adapter.go +++ b/proxy/grpcproxy/adapter/lease_client_adapter.go @@ -15,9 +15,10 @@ package adapter import ( - "golang.org/x/net/context" + "context" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "google.golang.org/grpc" ) diff --git a/proxy/grpcproxy/adapter/lock_client_adapter.go b/proxy/grpcproxy/adapter/lock_client_adapter.go index 05e5cb020..9ce7913a3 100644 --- a/proxy/grpcproxy/adapter/lock_client_adapter.go +++ b/proxy/grpcproxy/adapter/lock_client_adapter.go @@ -15,9 +15,10 @@ package adapter import ( + "context" + "github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb" - "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/proxy/grpcproxy/adapter/maintenance_client_adapter.go b/proxy/grpcproxy/adapter/maintenance_client_adapter.go index 66aaabba1..92d9dfd20 100644 --- a/proxy/grpcproxy/adapter/maintenance_client_adapter.go +++ b/proxy/grpcproxy/adapter/maintenance_client_adapter.go @@ -15,9 +15,10 @@ package adapter import ( + "context" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/proxy/grpcproxy/adapter/watch_client_adapter.go b/proxy/grpcproxy/adapter/watch_client_adapter.go index af4a13c41..afe61e837 100644 --- a/proxy/grpcproxy/adapter/watch_client_adapter.go +++ b/proxy/grpcproxy/adapter/watch_client_adapter.go @@ -15,10 +15,10 @@ package adapter import ( + "context" "errors" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/proxy/grpcproxy/auth.go b/proxy/grpcproxy/auth.go index c1b75e36d..0ed8d246d 100644 --- a/proxy/grpcproxy/auth.go +++ b/proxy/grpcproxy/auth.go @@ -15,7 +15,7 @@ package grpcproxy import ( - "golang.org/x/net/context" + "context" "github.com/coreos/etcd/clientv3" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" diff --git a/proxy/grpcproxy/cluster.go b/proxy/grpcproxy/cluster.go index 899fb9be6..2ee91ae10 100644 --- a/proxy/grpcproxy/cluster.go +++ b/proxy/grpcproxy/cluster.go @@ -15,6 +15,7 @@ package grpcproxy import ( + "context" "fmt" "os" "sync" @@ -23,7 +24,6 @@ import ( "github.com/coreos/etcd/clientv3/naming" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" "golang.org/x/time/rate" "google.golang.org/grpc" gnaming "google.golang.org/grpc/naming" diff --git a/proxy/grpcproxy/cluster_test.go b/proxy/grpcproxy/cluster_test.go index e36234c19..f2c0af3f0 100644 --- a/proxy/grpcproxy/cluster_test.go +++ b/proxy/grpcproxy/cluster_test.go @@ -15,6 +15,7 @@ package grpcproxy import ( + "context" "net" "testing" "time" @@ -24,7 +25,6 @@ import ( "github.com/coreos/etcd/integration" "github.com/coreos/etcd/pkg/testutil" - "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/proxy/grpcproxy/election.go b/proxy/grpcproxy/election.go index 27115a81d..4b4a4cc42 100644 --- a/proxy/grpcproxy/election.go +++ b/proxy/grpcproxy/election.go @@ -15,7 +15,7 @@ package grpcproxy import ( - "golang.org/x/net/context" + "context" "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb" diff --git a/proxy/grpcproxy/health.go b/proxy/grpcproxy/health.go index e660800e9..9e2c93ca8 100644 --- a/proxy/grpcproxy/health.go +++ b/proxy/grpcproxy/health.go @@ -15,14 +15,13 @@ package grpcproxy import ( + "context" "net/http" "time" "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/etcdserver/api/etcdhttp" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" - - "golang.org/x/net/context" ) // HandleHealth registers health handler on '/health'. diff --git a/proxy/grpcproxy/kv.go b/proxy/grpcproxy/kv.go index 4e6b03661..ff445393d 100644 --- a/proxy/grpcproxy/kv.go +++ b/proxy/grpcproxy/kv.go @@ -15,11 +15,11 @@ package grpcproxy import ( + "context" + "github.com/coreos/etcd/clientv3" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/proxy/grpcproxy/cache" - - "golang.org/x/net/context" ) type kvProxy struct { diff --git a/proxy/grpcproxy/kv_test.go b/proxy/grpcproxy/kv_test.go index b0fecc37a..33fb597c0 100644 --- a/proxy/grpcproxy/kv_test.go +++ b/proxy/grpcproxy/kv_test.go @@ -15,6 +15,7 @@ package grpcproxy import ( + "context" "net" "testing" "time" @@ -24,7 +25,6 @@ import ( "github.com/coreos/etcd/integration" "github.com/coreos/etcd/pkg/testutil" - "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/proxy/grpcproxy/leader.go b/proxy/grpcproxy/leader.go index 86afdb707..7dde221c4 100644 --- a/proxy/grpcproxy/leader.go +++ b/proxy/grpcproxy/leader.go @@ -15,14 +15,14 @@ package grpcproxy import ( + "context" "math" "sync" - "golang.org/x/net/context" + "github.com/coreos/etcd/clientv3" + "golang.org/x/time/rate" "google.golang.org/grpc" - - "github.com/coreos/etcd/clientv3" ) const ( diff --git a/proxy/grpcproxy/lease.go b/proxy/grpcproxy/lease.go index cad013f6f..65f68b0ea 100644 --- a/proxy/grpcproxy/lease.go +++ b/proxy/grpcproxy/lease.go @@ -15,19 +15,18 @@ package grpcproxy import ( + "context" "io" "sync" "sync/atomic" "time" - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" - - "golang.org/x/net/context" - "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" ) type leaseProxy struct { diff --git a/proxy/grpcproxy/lock.go b/proxy/grpcproxy/lock.go index 804aff64a..ceef26f0a 100644 --- a/proxy/grpcproxy/lock.go +++ b/proxy/grpcproxy/lock.go @@ -15,7 +15,7 @@ package grpcproxy import ( - "golang.org/x/net/context" + "context" "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb" diff --git a/proxy/grpcproxy/maintenance.go b/proxy/grpcproxy/maintenance.go index b32a573b4..21fe79fa5 100644 --- a/proxy/grpcproxy/maintenance.go +++ b/proxy/grpcproxy/maintenance.go @@ -15,10 +15,9 @@ package grpcproxy import ( + "context" "io" - "golang.org/x/net/context" - "github.com/coreos/etcd/clientv3" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" ) diff --git a/proxy/grpcproxy/watch.go b/proxy/grpcproxy/watch.go index b960c9476..c93cfc38d 100644 --- a/proxy/grpcproxy/watch.go +++ b/proxy/grpcproxy/watch.go @@ -15,16 +15,16 @@ package grpcproxy import ( + "context" "sync" - "golang.org/x/net/context" - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" - "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/etcdserver/api/v3rpc" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" ) type watchProxy struct { diff --git a/proxy/grpcproxy/watch_broadcast.go b/proxy/grpcproxy/watch_broadcast.go index 5e750bdb0..ce45f8770 100644 --- a/proxy/grpcproxy/watch_broadcast.go +++ b/proxy/grpcproxy/watch_broadcast.go @@ -15,10 +15,9 @@ package grpcproxy import ( + "context" "sync" - "golang.org/x/net/context" - "github.com/coreos/etcd/clientv3" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" ) diff --git a/raft/node.go b/raft/node.go index 5da1c1193..ba25b7ddd 100644 --- a/raft/node.go +++ b/raft/node.go @@ -15,10 +15,10 @@ package raft import ( + "context" "errors" pb "github.com/coreos/etcd/raft/raftpb" - "golang.org/x/net/context" ) type SnapshotStatus int diff --git a/raft/node_bench_test.go b/raft/node_bench_test.go index 4e60634a2..c3fc89f3f 100644 --- a/raft/node_bench_test.go +++ b/raft/node_bench_test.go @@ -15,10 +15,9 @@ package raft import ( + "context" "testing" "time" - - "golang.org/x/net/context" ) func BenchmarkOneNode(b *testing.B) { diff --git a/raft/node_test.go b/raft/node_test.go index f4c726ea8..4401412e7 100644 --- a/raft/node_test.go +++ b/raft/node_test.go @@ -16,13 +16,13 @@ package raft import ( "bytes" + "context" "reflect" "testing" "time" "github.com/coreos/etcd/pkg/testutil" "github.com/coreos/etcd/raft/raftpb" - "golang.org/x/net/context" ) // TestNodeStep ensures that node.Step sends msgProp to propc chan diff --git a/raft/rafttest/node.go b/raft/rafttest/node.go index a37a16839..0c47bb2f9 100644 --- a/raft/rafttest/node.go +++ b/raft/rafttest/node.go @@ -15,13 +15,13 @@ package rafttest import ( + "context" "log" "sync" "time" "github.com/coreos/etcd/raft" "github.com/coreos/etcd/raft/raftpb" - "golang.org/x/net/context" ) type node struct { diff --git a/raft/rafttest/node_bench_test.go b/raft/rafttest/node_bench_test.go index 1aa13c7b6..17cce6767 100644 --- a/raft/rafttest/node_bench_test.go +++ b/raft/rafttest/node_bench_test.go @@ -15,11 +15,11 @@ package rafttest import ( + "context" "testing" "time" "github.com/coreos/etcd/raft" - "golang.org/x/net/context" ) func BenchmarkProposal3Nodes(b *testing.B) { diff --git a/raft/rafttest/node_test.go b/raft/rafttest/node_test.go index c4f98de22..6a81c8b4f 100644 --- a/raft/rafttest/node_test.go +++ b/raft/rafttest/node_test.go @@ -15,11 +15,11 @@ package rafttest import ( + "context" "testing" "time" "github.com/coreos/etcd/raft" - "golang.org/x/net/context" ) func TestBasicProgress(t *testing.T) { diff --git a/rafthttp/functional_test.go b/rafthttp/functional_test.go index b4f04d3eb..2a04a91cd 100644 --- a/rafthttp/functional_test.go +++ b/rafthttp/functional_test.go @@ -15,6 +15,7 @@ package rafthttp import ( + "context" "net/http/httptest" "reflect" "testing" @@ -24,7 +25,6 @@ import ( "github.com/coreos/etcd/pkg/types" "github.com/coreos/etcd/raft" "github.com/coreos/etcd/raft/raftpb" - "golang.org/x/net/context" ) func TestSendMessage(t *testing.T) { diff --git a/rafthttp/http.go b/rafthttp/http.go index 55df26e9b..d99832d89 100644 --- a/rafthttp/http.go +++ b/rafthttp/http.go @@ -15,6 +15,7 @@ package rafthttp import ( + "context" "errors" "fmt" "io/ioutil" @@ -27,7 +28,6 @@ import ( "github.com/coreos/etcd/raft/raftpb" "github.com/coreos/etcd/snap" "github.com/coreos/etcd/version" - "golang.org/x/net/context" ) const ( diff --git a/rafthttp/peer.go b/rafthttp/peer.go index b8de635aa..9aee4dbc9 100644 --- a/rafthttp/peer.go +++ b/rafthttp/peer.go @@ -15,6 +15,7 @@ package rafthttp import ( + "context" "sync" "time" @@ -23,7 +24,7 @@ import ( "github.com/coreos/etcd/raft" "github.com/coreos/etcd/raft/raftpb" "github.com/coreos/etcd/snap" - "golang.org/x/net/context" + "golang.org/x/time/rate" ) diff --git a/rafthttp/transport.go b/rafthttp/transport.go index 50219db71..78f92dd21 100644 --- a/rafthttp/transport.go +++ b/rafthttp/transport.go @@ -15,6 +15,7 @@ package rafthttp import ( + "context" "net/http" "sync" "time" @@ -26,9 +27,9 @@ import ( "github.com/coreos/etcd/raft" "github.com/coreos/etcd/raft/raftpb" "github.com/coreos/etcd/snap" + "github.com/coreos/pkg/capnslog" "github.com/xiang90/probing" - "golang.org/x/net/context" "golang.org/x/time/rate" ) diff --git a/rafthttp/transport_bench_test.go b/rafthttp/transport_bench_test.go index 620e0dbf7..cd586461f 100644 --- a/rafthttp/transport_bench_test.go +++ b/rafthttp/transport_bench_test.go @@ -15,6 +15,7 @@ package rafthttp import ( + "context" "net/http/httptest" "sync" "testing" @@ -24,7 +25,6 @@ import ( "github.com/coreos/etcd/pkg/types" "github.com/coreos/etcd/raft" "github.com/coreos/etcd/raft/raftpb" - "golang.org/x/net/context" ) func BenchmarkSendingMsgApp(b *testing.B) { diff --git a/tools/functional-tester/etcd-tester/checks.go b/tools/functional-tester/etcd-tester/checks.go index f3c5de9b4..81a659ac2 100644 --- a/tools/functional-tester/etcd-tester/checks.go +++ b/tools/functional-tester/etcd-tester/checks.go @@ -15,15 +15,15 @@ package main import ( + "context" "fmt" "time" - "google.golang.org/grpc" - "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" + + "google.golang.org/grpc" ) const ( diff --git a/tools/functional-tester/etcd-tester/cluster.go b/tools/functional-tester/etcd-tester/cluster.go index 61f36f0c9..5f6e001a6 100644 --- a/tools/functional-tester/etcd-tester/cluster.go +++ b/tools/functional-tester/etcd-tester/cluster.go @@ -15,16 +15,16 @@ package main import ( + "context" "fmt" "math/rand" "net" "strings" "time" - "golang.org/x/net/context" - pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/tools/functional-tester/etcd-agent/client" + "google.golang.org/grpc" ) diff --git a/tools/functional-tester/etcd-tester/key_stresser.go b/tools/functional-tester/etcd-tester/key_stresser.go index 1e351b7e1..d94a7c7bf 100644 --- a/tools/functional-tester/etcd-tester/key_stresser.go +++ b/tools/functional-tester/etcd-tester/key_stresser.go @@ -15,20 +15,20 @@ package main import ( + "context" "fmt" "math/rand" "sync" "sync/atomic" "time" - "golang.org/x/net/context" // grpc does a comparison on context.Cancel; can't use "context" package - "golang.org/x/time/rate" - "google.golang.org/grpc" - "google.golang.org/grpc/transport" - "github.com/coreos/etcd/etcdserver" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + + "golang.org/x/time/rate" + "google.golang.org/grpc" + "google.golang.org/grpc/transport" ) type keyStresser struct { diff --git a/tools/functional-tester/etcd-tester/lease_stresser.go b/tools/functional-tester/etcd-tester/lease_stresser.go index 0767ccc2b..1ca788410 100644 --- a/tools/functional-tester/etcd-tester/lease_stresser.go +++ b/tools/functional-tester/etcd-tester/lease_stresser.go @@ -15,16 +15,16 @@ package main import ( + "context" "fmt" "math/rand" "sync" "sync/atomic" - "time" "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "golang.org/x/net/context" + "golang.org/x/time/rate" "google.golang.org/grpc" ) diff --git a/tools/functional-tester/etcd-tester/member.go b/tools/functional-tester/etcd-tester/member.go index 7954e534c..64aa5ca12 100644 --- a/tools/functional-tester/etcd-tester/member.go +++ b/tools/functional-tester/etcd-tester/member.go @@ -15,17 +15,17 @@ package main import ( + "context" "fmt" "net" "net/url" "time" - "golang.org/x/net/context" - "google.golang.org/grpc" - "github.com/coreos/etcd/clientv3" pb "github.com/coreos/etcd/etcdserver/etcdserverpb" "github.com/coreos/etcd/tools/functional-tester/etcd-agent/client" + + "google.golang.org/grpc" ) type member struct {