为了避免引入不必要的库, rpcx采用了 Go 条件编译 的特性, 你可以只引入必要的特性。 比如你只使用 etcd 作为注册中心的时候, 你不希望引入 consul、zookeeper相关的库,你需要在 Go BuildTags中指定 etcd。

如果不指定 tags,可能会出现下面的错误。

.server.go:37:8: undefined: serverplugin.ConsulRegisterPlugin

https://github.com/smallnest/rpcx/wiki/BuildTags

 go get -u -v -tags "reuseport quic kcp zookeeper etcd consul ping utp" github.com/smallnest/rpcx/... 

【golang】使用rpcx不指定tags报错 undefined: serverplugin.ConsulRegisterPlugin的更多相关文章

  1. vue组件,通过props父组件给子组件传值,WTF, 子组件报错undefined???

    如果是正常操作,找了半天又找不到为什么undefined, 那很可能是props的命名出了问题: 不要用小驼峰式命名 例如这种childrenData 这种形式就会报错undefined  请尽量用全 ...

  2. golang在import自己的包报错问题

    原因:使用git clone项目后,项目根路径是小写英文名称,比如cmdbapi,但是项目里面的import导入自己的相关包时,红色报错 解决:把项目名称改写成import导入包的名称,即cmdbAp ...

  3. eclipse报错“Undefined variable from import: ...”解决方案

    环境 eclipse + pydev2.8.2 + python 3.5.1/python 2.7.11 + wxpython3.0 出现原因:原先默认解释器设置为python2,重装了pydev之后 ...

  4. windows下codeblocks报错undefined reference to `WSAStartup@8'|

    Windows下C++Socket编程,调用WSAStartup函数报错:undefined reference to `WSAStartup@8'| 本人使用的是Codeblocks MinGW M ...

  5. revel run报错 undefined: sys call.SIGUSR2"

    revel run报错,报错信息为 o Compilation Error (in ..\\..\\revel\\server_adapter_go.go:135): undefined: sysca ...

  6. rails中render 和 redirect_to的区别, each只能用在数组中,如果只有一个或者零个项,用each方法会报错undefined method `each' for #...

    在render中,即使有:action,那么也仅仅是取对应的view中的模板(html.erb)而已,所以这里即使浏览器中的url是/orders/xcreate,但是显示的界面是/app/views ...

  7. Golang通过git clone beego框架报错 error: while accessing https://github.com/astaxie/beego/info/refs fatal: HTTP request failed package github.com/astaxie/beego: exit status 128

    在Centos6.4尝试搭建beego框架,使用git命令clone时报错 # cd .; git clone https://github.com/astaxie/beego /www/projec ...

  8. centos7 安装PHP5.3 报错undefined reference to symbol '__gxx_personality_v0@@CXXABI_1.3'

    系统:centos 7 原有PHP版本:5.6.27,5.4.45 试着安装nginx+多php版本,首先安装了5.6和5.4的版本,一帆风顺,但是在安装5.3.29版本时,出现问题了,configu ...

  9. cocos2d-x android 添加新场景报错: undefined reference to `vtable for XXX'

    转载自 居家懒人 http://www.cnblogs.com/JD85/archive/2012/09/17/2688128.html 加入写了新场景SecondScene,结果在cpp文件里类名地 ...

随机推荐

  1. vs2012配置gitHub管理代码详细步骤

    http://www.bitscn.com/pdb/otherdb/201411/411244.html

  2. Flutter Image(图片)

    Image是一个用于展示图片的组件.支持 JPEG.PNG.GIF.Animated GIF.WebP.Animated WebP.BMP 和 WBMP 等格式. Image 有许多的静态函数: ne ...

  3. 信号的有效值(RMS)估计

    % Root Mean Square Value function [retval] = rms1(sig) N = 20; for k = 1 : length(sig)/N - 1 sig_sum ...

  4. WinServer-文件共享端口

    When turning on Firewall, please assure that “File and Printer Sharing” on current network profile i ...

  5. Android笔记(六十六) android中的动画——XML文件定义属性动画

    除了直接在java代码中定义动画之外,还可以使用xml文件定义动画,以便重用. 如果想要使用XML来编写动画,首先要在res目录下面新建一个animator文件夹,所有属性动画的XML文件都应该存放在 ...

  6. 设置Django生产环境系统重启后的自动启动项

    前面,作者已经介绍了把Django部署到生产环境中的主要方法,现在我们来看一下如何设置项目开机启动. 在把Django项目部署到生产环境中时,我们前面使用安装包和源码安装了Nginx.uwsgi.re ...

  7. WSDL知识点

    WSDL 是基于 XML 的用于描述 Web Services 以及如何访问 Web Services 的语言. WSDL简介 1.什么是 WSDL? WSDL 指网络服务描述语言 WSDL 使用 X ...

  8. 拖拉插件 drag drop

    https://hejx.herokuapp.com/vue-dndl # Installation npm install vue-drag-and-drop-list --save # Usage ...

  9. yum 异常解决一例

    http://mirrors.cloud.aliyuncs.com/centos/6/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 ...

  10. java读取excel的内容(可保存到数据库中)

    //** poi jar包 // public class ReadExcel { @SuppressWarnings("static-access") private stati ...