Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/randgalt/zkgrpc
https://github.com/randgalt/zkgrpc
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/randgalt/zkgrpc
- Owner: Randgalt
- Created: 2019-11-18T13:20:47.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-20T19:00:55.000Z (almost 5 years ago)
- Last Synced: 2024-10-16T20:48:13.135Z (28 days ago)
- Language: Go
- Size: 16.6 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## ZooKeeper gRPC Test
### Build gRPC ZooKeeper
```
git clone -b wip-grpc https://github.com/Randgalt/zookeeper.git zkgrpc
cd zkgrpc
mvn -DskipTests -Darguments="-DskipTests" package
cp conf/zoo_sample.cfg conf/zoo.cfg
export SERVER_JVMFLAGS=-Dzookeeper.serverCnxnFactory=org.apache.zookeeper.grpc.RpcServerCnxnFactory
bin/zkServer.sh start-foreground
```### Build gRPC Go Client Test
In your Go directory...
```
git clone https://github.com/Randgalt/zkgrpc.git
cd zkgrpc
go get
go build main.go
go run zkgrpc
```You should see some output
```
2019/11/18 09:04:04 Header: - Response: &{sessionId:72096894323720192 sessionTimeout:40000 }
2019/11/18 09:04:04 Header: xid:2 zxid:51 - Response: &{path:"/test" stat: }
2019/11/18 09:04:04 Header: xid:3 zxid:51 - Response:
2019/11/18 09:04:04 Header: xid:-1 zxid:-1 - Response: &{keeperState:SyncConnected eventType:NodeDeleted path:"/test" }
2019/11/18 09:04:04 Header: xid:4 zxid:52 - Response:
```