cannot use "google.golang.org/grpc/naming".Update literal (type "google.golang.org/grpc/naming".Update) as type "go.etcd.io/etcd/vendor/google.golang.org/grpc/naming".Update in argument to r.Update
This is my code:
import (
"go.etcd.io/etcd/clientv3"
etcdnaming "go.etcd.io/etcd/clientv3/naming"
"google.golang.org/grpc"
"google.golang.org/grpc/naming"
)
//
// Dial an RPC service using the etcd gRPC resolver and a gRPC Balancer:
//
func etcdDial(c *clientv3.Client, service string) (*grpc.ClientConn, error) {
r := &etcdnaming.GRPCResolver{Client: c}
b := grpc.RoundRobin(r)
return grpc.Dial(service, grpc.WithBalancer(b))
}
@tobeabme try importing github.com/coreos/etcd
import (
"github.com/coreos/etcd/clientv3"
etcdnaming "github.com/coreos/etcd/clientv3/naming"
"google.golang.org/grpc"
)
# go.mod
github.com/coreos/etcd v3.3.11+incompatible
@hexfusion When I try importing github.com/coreos/etcd I got this:
import (
"github.com/coreos/etcd/clientv3"
etcdnaming "github.com/coreos/etcd/clientv3/naming"
"google.golang.org/grpc"
)
func EtcdDial(c *clientv3.Client, service string) (*grpc.ClientConn, error) {
r := &etcdnaming.GRPCResolver{Client: c}
b := grpc.RoundRobin(r)
return grpc.Dial(service, grpc.WithBalancer(b))
}
github.com/coreos/etcd/clientv3
../../../../../github.com/coreos/etcd/clientv3/auth.go:116:72: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOpti
on) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.AuthEnable
../../../../../github.com/coreos/etcd/clientv3/auth.go:121:74: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOpti
on) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.AuthDisable
../../../../../github.com/coreos/etcd/clientv3/auth.go:126:100: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserAdd
../../../../../github.com/coreos/etcd/clientv3/auth.go:131:86: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserDelete
../../../../../github.com/coreos/etcd/clientv3/auth.go:136:122: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserChangePassword
../../../../../github.com/coreos/etcd/clientv3/auth.go:141:104: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserGrantRole
../../../../../github.com/coreos/etcd/clientv3/auth.go:146:80: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserGet
../../../../../github.com/coreos/etcd/clientv3/auth.go:151:72: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserList
../../../../../github.com/coreos/etcd/clientv3/auth.go:156:106: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserRevokeRole
../../../../../github.com/coreos/etcd/clientv3/auth.go:161:80: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.RoleAdd
../../../../../github.com/coreos/etcd/clientv3/auth.go:161:80: too many errors
@hexfusion Etcd version is 3.3.0+git
vim github.com/coreos/etcd/version/version.go
MinClusterVersion = "3.0.0"
Version = "3.3.0+git"
APIVersion = "unknown"
Many projects have started updating their use of etcd to point to github.com/etcd-io/etcd, which is causing problems because v3.3.11 references github.com/coreos/etcd. Is there any chance etcd can standardize?
Is there any chance etcd can standardize?
@cgreenlee-tc you will see this in 3.4 as master is already using etcd-io. This is a series of unfortunate events. We changed org in between minor versions and experience growing pains of go mod at same time. 3.3 is the past so to speak and we can't change that. This topic will be a focus of our next community meeting as the situation is causing a lot of confusion and frustration for folks. Apologies but we need to ride this out unless someone has other ideas please chime in.
We will attempt to document this as well as we can.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.
Most helpful comment
@tobeabme try importing github.com/coreos/etcd