docs: readme
parent
7259f75917
commit
8b33032082
26
README.md
26
README.md
|
@ -2,18 +2,38 @@
|
||||||
|
|
||||||
This repository demonstrates how to use gRPC with Go and various plugins. It's a simple API to manage notes. It uses grpc-gateway to handle HTTP requests and openapi to define API specs.
|
This repository demonstrates how to use gRPC with Go and various plugins. It's a simple API to manage notes. It uses grpc-gateway to handle HTTP requests and openapi to define API specs.
|
||||||
|
|
||||||
|
## Demonstrated features
|
||||||
|
|
||||||
|
- buf.build framework
|
||||||
|
- grpc gateway + openapi specs and swagger UI
|
||||||
|
- graceful server shut down (designed for orchestration systems such as k8s)
|
||||||
|
- gRPC [health check protocol](https://github.com/grpc/grpc/blob/master/doc/health-checking.md#grpc-health-checking-protocol).
|
||||||
|
- rpc message validation
|
||||||
|
|
||||||
|
⚠️ For demo purposes, encryption wasn't properly handled in this project.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
This project uses go1.20.
|
This project uses go1.20.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ make install-tools
|
$ make install-tools
|
||||||
$ make generate
|
$ make build
|
||||||
```
|
```
|
||||||
|
|
||||||
### Run the server
|
### Run the server
|
||||||
|
|
||||||
```
|
```
|
||||||
$ make build
|
$ ./bin/server -h
|
||||||
$ ./bin/server
|
Usage of ./bin/server:
|
||||||
|
-grpc-server-endpoint string
|
||||||
|
gRPC server endpoint (default "localhost:9090")
|
||||||
|
-http-server-endpoint string
|
||||||
|
HTTP server endpoint (default "localhost:8000")
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Health checking
|
||||||
|
|
||||||
|
```
|
||||||
|
$ ./bin/
|
||||||
```
|
```
|
Loading…
Reference in New Issue