From bcf5313eab02c186a1cdfa87efb57ce94d35b9e2 Mon Sep 17 00:00:00 2001 From: Tao He Date: Sun, 31 Jan 2021 15:24:23 +0800 Subject: [PATCH] Continue work for #36, add instructions about how to install deependencies. --- README.md | 29 +++++++++++++++++++---------- src/Client.cpp | 2 +- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index b6649b8..7b1a6c6 100644 --- a/README.md +++ b/README.md @@ -27,20 +27,29 @@ i.e., `ETCDCTL_API=3`. 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 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 \ - libgrpc++-dev \ - libprotobuf-dev \ - protobuf-compiler-grpc + apt-get install libgrpc-dev \ + libgrpc++-dev \ + libprotobuf-dev \ + 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 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 etcd::Client etcd("http://a.com:2379,http://b.com:2379,http://c.com:2379"); - // or, separated colon - etcd::Client etcd("http://a.com:2379,http://b.com:2379,http://c.com:2379"); + // or, separated semicolon + 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 diff --git a/src/Client.cpp b/src/Client.cpp index 70fcd52..b3a4bac 100644 --- a/src/Client.cpp +++ b/src/Client.cpp @@ -63,7 +63,7 @@ static bool dns_resolve(std::string const &target, std::vector &end int err = WSAStartup(wVersionRequested, &wsaData); 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; return false; }