feat: add go protobuf generation (#6)

* feat: add go protobuf generation

* ci: check go protbuf generation

* refactor: use 'namely/protoc-all:1.51_1' to compile the proto instead of locally binary

* refactor: no need to add the 'bin/' igore

* chore: modify code format

* refactor: add some comments to describe our modification
This commit is contained in:
zyy17
2023-02-15 15:10:17 +08:00
committed by GitHub
parent 3e6349be12
commit 36147379c3
33 changed files with 9755 additions and 8 deletions
+31 -4
View File
@@ -10,9 +10,19 @@ GreptimeDB protobuf files.
### Command
```text
make
```
- **Compile for Rust**
```console
make rust
```
- **Compile for Go**
```console
make go
```
The compilation will use builder container `namely/protoc-all`.
## Usage
@@ -34,6 +44,23 @@ use greptime_proto::v1::meta::*;
use greptime_proto::prometheus::remote::*;
```
### Go
Download the go module:
```console
go get github.com/GreptimeTeam/greptime-proto@main
```
Then use greptime-proto as the normal Go module:
```go
import (
greptimev1 "github.com/GreptimeTeam/greptime-proto/go/greptime/v1"
)
...
```
## For SDK developers
GreptimeDB's gRPC service is built on top of [Arrow Flight RPC](https://arrow.apache.org/docs/format/Flight.html). You can find the Arrow's official implementation status of each programming language [here](https://arrow.apache.org/docs/status.html#flight-rpc).
@@ -42,7 +69,7 @@ GreptimeDB's gRPC service is built on top of [Arrow Flight RPC](https://arrow.ap
Once the Arrow Flight client is ready, you only need to care about the following 3 protobuf files to accomplish our SDK writing:
```text
```console
.
├── greptime
│   └── v1