# go.etcd.io/etcd/clientv3/balancer/picker
/home/user/go/src/go.etcd.io/etcd/clientv3/balancer/picker/err.go:37:44: undefined: balancer.PickOptions
/home/user/go/src/go.etcd.io/etcd/clientv3/balancer/picker/roundrobin_balanced.go:55:54:
undefined: balancer.PickOptions
# go.etcd.io/etcd/clientv3/balancer/resolver/endpoint
/home/user/go/src/go.etcd.io/etcd/clientv3/balancer/resolver/endpoint/endpoint.go:114:78:
undefined: resolver.BuildOption
/home/user/go/src/go.etcd.io/etcd/clientv3/balancer/resolver/endpoint/endpoint.go:183:31:
undefined: resolver.ResolveNowOption
导致这个问题的原因是grpc的版本,go.mod文件中:
google.golang.org/grpc v1.27.0
而v1.26.0是可以的,修改go.mod中的版本为:
google.golang.org/grpc v1.26.0
执行以下命令:
go get google.golang.org/grpc@v1.26.0