Discovery is a based service that is production-ready and primarily used at Bilibili for locating services for the purpose of load balancing and failover of middle-tier servers.
go1.12.x
(and later)
git clone https://github.com/bilibili/discovery.git
cd cmd/discovery
go build -o discovery
./discovery -conf=discovery.toml
-alsologtostderr
是glog
的命令行参数,最新版的discovery
日志库不再使用glog
,因此原文档中这个参数是错误的
You can view the comments in cmd/discovery/discovery.toml
to understand the meaning of the config.
编译
make build
运行
make run
Please report bugs, concerns, suggestions by issues, or join QQ-group 716486124 to discuss problems around source code.