https://github.com/virtualstaticvoid/eventinator
NATS Streaming via gRPC Prototype
https://github.com/virtualstaticvoid/eventinator
golang grpc grpc-go nats nats-streaming protobuf protobuf3 prototype
Last synced: 4 months ago
JSON representation
NATS Streaming via gRPC Prototype
- Host: GitHub
- URL: https://github.com/virtualstaticvoid/eventinator
- Owner: virtualstaticvoid
- License: mit
- Created: 2018-09-24T10:04:30.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-06T23:43:11.000Z (over 2 years ago)
- Last Synced: 2024-11-15T07:45:34.531Z (11 months ago)
- Topics: golang, grpc, grpc-go, nats, nats-streaming, protobuf, protobuf3, prototype
- Language: Go
- Size: 11.5 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NATS Streaming via gRPC Prototype
Prototype to try out NATS Streaming via a gRPC service, using streaming request/response
for publishing and subscribing to the messages.## Usage
Build the docker image and run the server.
```
docker-compose build
docker-compose up nats server
```Run two terminals, one for publishing messages,
```
docker-compose up publisher
```And another for subscribing to the messages.
```
docker-compose up subscriber
```To get metrics, visit `http://localhost:9000/metrics`.
E.g. Watch for any metric with the `eventinator` prefix
```
watch 'curl http://localhost:9000/metrics | grep ^eventinator'
```## Hacking
On Linux, install the `protoc` tool and the golang compilers for `protobuf` and `grpc` compilers if you plan on changing any of the `*.proto` files.
```
sudo apt install protobuf-compiler
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
```To (re)generate the protocol buffers and gRPC files.
```
go generate
```## License
MIT License. Copyright (c) 2018 Chris Stefano. See LICENSE for details.