Skip to content

Commit

Permalink
Merge pull request #9 from go-graphite/vtproto
Browse files Browse the repository at this point in the history
Use vtprotobuf as a generator
  • Loading branch information
Civil authored Jun 5, 2021
2 parents e41de23 + 0115894 commit ac8ad6a
Show file tree
Hide file tree
Showing 606 changed files with 9,264 additions and 335,797 deletions.
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,26 @@ go-graphite/protocol
This repository contains protocol definitions for go-graphite services

* zipper-* - protocols used for reading path
* carbonapi_v3_grpc - gRPC service definitions for new zipper protocol. Status: **WIP**
* carbonapi_v3_pb - new protobuf3-based protocol that's used as a base for gRPC communcation Status: **STABLE**
* carbonapi_v2_pb - current production protobuf3-based protocol. Status: **STABLE**
* carbonapi_v1_pb - protobuf2 protocol, used in carbonzipper 0.6x or earlier. Status: **Deprecated**

Historical proto releases (deprecated and removed after v1.0.0 release):
* carbonapi_v3_grpc - gRPC service definitions for new zipper protocol. Was never used in any known system, might need a redisign if carbonapi or something else will implement gRPC support.
* carbonapi_v1_pb - protobuf2 protocol, used in carbonzipper 0.6x or earlier. Carbonapi no longer supports that protocol.


Generating Go from *.proto files
--------------------------------

We use [gogo/protobuf](https://github.com/gogo/protobuf). Install the binaries
needed with:
We use [planetscale/vtprotobuf](https://github.com/planetscale/vtprotobuf) generator.

To install required generators please use:
```
$ go get github.com/gogo/protobuf/proto
$ go get github.com/gogo/protobuf/protoc-gen-gogofast
$ go get github.com/gogo/protobuf/protoc-gen-gogofaster
$ go get github.com/gogo/protobuf/protoc-gen-gogoslick
$ go get github.com/gogo/protobuf/gogoproto
$ go install github.com/planetscale/vtprotobuf/cmd/protoc-gen-go-vtproto
```

Then generate Go files with:
```
$ go generate ./...
$ go generate carbonapi_v2_pb/gen.go
$ go generate carbonapi_v3_pb/gen.go
```
Loading

0 comments on commit ac8ad6a

Please sign in to comment.