Continue work for #36, add instructions about how to install deependencies.

This commit is contained in:
Tao He 2021-01-31 15:24:23 +08:00
parent cd3e30b492
commit bcf5313eab
2 changed files with 20 additions and 11 deletions

View File

@ -27,20 +27,29 @@ i.e., `ETCDCTL_API=3`.
1. boost 1. boost
On Ubuntu, above requirement could be installed as: + On Ubuntu, above requirement could be installed as:
apt-get install libboost-all-dev
+ On MacOS, above requirement could be installed as:
brew install boost
apt-get install libboost-all-dev
2. protobuf 2. protobuf
3. gRPC 3. gRPC
On Ubuntu, above requirements related to protobuf and gRPC can be installed as: + On Ubuntu, above requirements related to protobuf and gRPC can be installed as:
apt-get install libgrpc-dev \ apt-get install libgrpc-dev \
libgrpc++-dev \ libgrpc++-dev \
libprotobuf-dev \ libprotobuf-dev \
protobuf-compiler-grpc protobuf-compiler-grpc
+ On MacOS, above requirements related to protobuf and gRPC can be installed as:
brew install grpc protobuf
4. [cpprestsdk](https://github.com/microsoft/cpprestsdk), the latest version of master branch 4. [cpprestsdk](https://github.com/microsoft/cpprestsdk), the latest version of master branch
on github should work, you can build and install this dependency using cmake with: on github should work, you can build and install this dependency using cmake with:
@ -141,8 +150,8 @@ Connecting to multiple endpoints is supported:
// multiple endpoints are separated by comma // multiple endpoints are separated by comma
etcd::Client etcd("http://a.com:2379,http://b.com:2379,http://c.com:2379"); etcd::Client etcd("http://a.com:2379,http://b.com:2379,http://c.com:2379");
// or, separated colon // or, separated semicolon
etcd::Client etcd("http://a.com:2379,http://b.com:2379,http://c.com:2379"); etcd::Client etcd("http://a.com:2379;http://b.com:2379;http://c.com:2379");
``` ```
Behind the screen, gRPC's load balancer is used and the round-robin strategy will Behind the screen, gRPC's load balancer is used and the round-robin strategy will

View File

@ -63,7 +63,7 @@ static bool dns_resolve(std::string const &target, std::vector<std::string> &end
int err = WSAStartup(wVersionRequested, &wsaData); int err = WSAStartup(wVersionRequested, &wsaData);
if (err != 0) { if (err != 0) {
// Tell the user that we could not find a usable Winsock DLL. */ // Tell the user that we could not find a usable Winsock DLL.
std::cerr << "WSAStartup failed with error: %d" << err << std::endl; std::cerr << "WSAStartup failed with error: %d" << err << std::endl;
return false; return false;
} }