summaryrefslogtreecommitdiffhomepage
path: root/docs/sources/grpc-client.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/sources/grpc-client.md')
-rw-r--r--docs/sources/grpc-client.md18
1 files changed, 6 insertions, 12 deletions
diff --git a/docs/sources/grpc-client.md b/docs/sources/grpc-client.md
index 3cb8e55c..088f6d60 100644
--- a/docs/sources/grpc-client.md
+++ b/docs/sources/grpc-client.md
@@ -79,19 +79,13 @@ We use .so compilation with golang, please use only 1.5 or newer version of Go L
['tools/grpc/cpp/gobgp_api_client.cc'](https://github.com/osrg/gobgp/blob/master/tools/grpc/cpp/gobgp_api_client.cc) shows an example for getting neighbor's information.
-Clone this repository and build API example:
+We provide ['tools/grpc/cpp/build.sh'](https://github.com/osrg/gobgp/blob/master/tools/grpc/cpp/build.sh) to build this sample code.
+This script also generates stub codes and builds GoBGP shared library.
+
+Let's build the sample code:
```bash
-export PATH="$PATH:/opt//grpc/bin:/opt/protobuf_3.0.0_alpha4/bin/"
-
-cd /usr/src
-git clone https://github.com/osrg/gobgp.git
-cd gobgp/gobgp/lib
-go build -buildmode=c-shared -o libgobgp.so *.go
-cp libgobgp.h /usr/src/gobgp/tools/grpc/cpp
-cp libgobgp.so /usr/src/gobgp/tools/grpc/cpp
-cp /usr/src/gobgp/api/gobgp.proto /usr/src/gobgp/tools/grpc/cpp/gobgp_api_client.proto
-cd /usr/src/gobgp/tools/grpc/cpp
-make
+$ cd $GOPATH/src/github.com/osrg/gobgp/tools/grpc/cpp
+$ bash build.sh
```
### Let's run it: