etcd源码调试
1)gdb
curl -L http://127.0.0.1:12380/my-key

2)ide调试
dlv安装
https://www.cnblogs.com/20170722-kong/p/10644487.html
go build -gcflags "all=-N -l" -o raftexample
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec ./raftexample
带参数增加--
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec ./raftexample -- --id 1 --cluster http://127.0.0.1:12379 --port 12380

3)api请求

4)编译etcd
make build
./bin/etcd --version

浙公网安备 33010602011771号