linux使用go连接etcd集群时报错:

# github.com/coreos/etcd/clientv3/balancer/resolver/endpoint
/root/go/pkg/mod/github.com/coreos/etcd@v3.3.27+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:114:87: undefined: resolver.BuildOption
/root/go/pkg/mod/github.com/coreos/etcd@v3.3.27+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:115:16: target.Authority undefined (type resolver.Target has no field or method Authority)
/root/go/pkg/mod/github.com/coreos/etcd@v3.3.27+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:118:15: target.Authority undefined (type resolver.Target has no field or method Authority)
/root/go/pkg/mod/github.com/coreos/etcd@v3.3.27+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:182:40: undefined: resolver.ResolveNowOption
# github.com/coreos/etcd/clientv3/balancer/picker
/root/go/pkg/mod/github.com/coreos/etcd@v3.3.27+incompatible/clientv3/balancer/picker/err.go:37:53: undefined: balancer.PickOptions
/root/go/pkg/mod/github.com/coreos/etcd@v3.3.27+incompatible/clientv3/balancer/picker/roundrobin_balanced.go:55:63: undefined: balancer.PickOptions

解决方法:

修改go.mod中grpc的版本为v1.26.0

google.golang.org/grpc v1.26.0 // indirect

再执行下面的命令就可以了

go mod edit -require=google.golang.org/grpc@v1.26.0
go get -u -x google.golang.org/grpc@v1.26.0

# github.com/coreos/etcd/clientv3/balancer/resolver/endpoint的更多相关文章

  1. webserver Etcd Cluster / CoreOS etcd / macOS etcd

    s https://coreos.com/etcd/ https://coreos.com/etcd/docs/latest/ macOS mojave etcd 003deMac-mini:~ ma ...

  2. quay.io/coreos/etcd 基于Docker镜像的集群搭建

    etcd是一个高可用的键值存储系统,主要用于共享配置和服务发现.etcd是由CoreOS开发并维护的,灵感来自于 ZooKeeper 和 Doozer,它使用Go语言编写,并通过Raft一致性算法处理 ...

  3. worker 启动时向 etcd 注册自己的信息,并设置一个带 TTL 的租约,每隔一段时间更新这个 TTL,如果该 worker 挂掉了,这个 TTL 就会 expire 并删除相应的 key。

    1.通过etcd中的选主机制,我们实现了服务的高可用.同时利用systemd对etcd本身进行了保活,只要etcd服务所在的机器没有宕机,进程就具备了容灾性. https://mp.weixin.qq ...

  4. Go语言学习之12 etcd、contex、kafka消费实例、logagent

    本节内容:    1. etcd介绍与使用    2. ElastcSearch介绍与使用 1. etcd介绍与使用    概念:高可用的分布式key-value存储,可以使用配置共享和服务发现    ...

  5. 搭建日志收集系统时使用客户端连接etcd遇到的问题

    问题: 在做日志收集系统时使用到etcd,其中server端在linux上,首先安装第三方包(windows)(安装过程可能会有问题,我遇到的是连接谷歌官网请求超时,如果已经出现下面的两个文件夹并且文 ...

  6. go etcd

    etcd介绍 GitHub:https://github.com/coreos/etcd 官网:https://coreos.com/etcd/ 下载:https://github.com/coreo ...

  7. Golang etcd服务注册与发现

    //sevice.go package discovery import ( "context" "errors" "sync" " ...

  8. Go etcd初探

    1.etcd集群的配置 SET IP1_2380=http://127.0.0.1:2380 SET IP1_2379=http://127.0.0.1:2379 SET IP2_2380=http: ...

  9. [GO]go使用etcd

    package main import ( "go.etcd.io/etcd/clientv3" //笔者在使用clientv3的时间曾经使用过github.com/coreos/ ...

  10. [Golang] ETCD键值监听器

    0x0 需求 我们所有的服务启动后都以lease形式注册入ETCD,现要把这些服务监控起来. 0x1 ETCD key监听器实现 可动态增删要监听的键值对 https://github.com/bai ...

随机推荐

  1. Codeforces Round #703 (Div. 2) A、B、D、E题解

    写在前边 链接:Codeforces Round #703 (Div. 2) 这次的交互题是真不会做. A. Shifting Stacks 链接:A题链接 题目大意: 有\(n\)摞高度分别为\(h ...

  2. 【源码系列#01】vue3响应式原理(Proxy)

    专栏分享:vue2源码专栏,vue3源码专栏,vue router源码专栏,玩具项目专栏,硬核推荐 欢迎各位ITer关注点赞收藏 在学习 Vue3 是如何进行对象的响应式代理之前,我想我们应该先去了解 ...

  3. LabVIEW基于机器视觉的实验室设备管理系统(1)

    目录 MySQL数据库 建表 表格转换格式 导入数据库 效果演示 今天,我们就来把慢蜗牛在大二时期做的大创来复现一遍.后续会逐渐更新,带着大家一步一步做出属于自己的管理系统. MySQL数据库 在开始 ...

  4. Object.assign () 和深拷贝

    先看看啥叫深拷贝?啥叫浅拷贝? 假设B复制了A,修改A的时候,看B是否发生变化: 如果B跟着也变了,说明是浅拷贝,拿人手短!(修改堆内存中的同一个值) 如果B没有改变,说明是深拷贝,自食其力!(修改堆 ...

  5. 【封装】Trie

    #include<cstdio> const int N = 1e6 + 5; struct Trie{ int root, id; bool bit[32]; struct Node{ ...

  6. 通过.NET Core+Vue3 实现SignalR即时通讯功能

    .NET Core 和 Vue3 结合使用 SignalR 可以实现强大的实时通讯功能,允许实时双向通信.在这个示例中,我们将详细说明如何创建一个简单的聊天应用程序,演示如何使用 .NET Core ...

  7. Ingress & Ingress Controller & API Gateway

    Ingress Ingress 内部服务如何暴露给集群外部访问 使用NodePort类型的service 将k8s集群中的服务暴露给集群外部访问,最简单的方式就是使用NodePort,类似在docke ...

  8. 基于.NET平台常用的框架整理【藏】

    来自:天使不哭 自从学习.NET以来,优雅的编程风格,极度简单的可扩展性,足够强大开发工具,极小的学习曲线,让我对这个平台产生了浓厚的兴趣,在工作和学习中也积累了一些开源的组件,就目前想到的先整理于此 ...

  9. Educational Codeforces Round 26 Problem A

    A. Text Volume time limit per test 1 second memory limit per test 256 megabytes input standard input ...

  10. python tkinter 使用(二)

    python tkinter 使用(二) 本篇文章着重讲下tkinter中messagebox的使用. 1:提示框 def showinfo(event): messagebox.showinfo(& ...