Skip to content

Commit

Permalink
Generate proto services with go-ttrpc
Browse files Browse the repository at this point in the history
Signed-off-by: Derek McGowan <derek@mcg.dev>
  • Loading branch information
dmcgowan committed Dec 23, 2022
1 parent 38e1ca0 commit da799ae
Show file tree
Hide file tree
Showing 16 changed files with 2,042 additions and 4 deletions.
14 changes: 13 additions & 1 deletion api/Protobuild.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version = "2"
generators = ["go", "go-grpc"]
generators = ["go", "go-grpc", "go-ttrpc"]

# Control protoc include paths. Below are usually some good defaults, but feel
# free to try it without them if it works for your project.
Expand All @@ -18,14 +18,23 @@ generators = ["go", "go-grpc"]
[packages]
"google/rpc/status.proto" = "google.golang.org/genproto/googleapis/rpc/status"

[parameters.go-ttrpc]
prefix = "TTRPC"

[[overrides]]
prefixes = ["github.com/containerd/containerd/api/events"]
generators = ["go", "go-ttrpc", "go-fieldpath"]

[overrides.parameters.go-ttrpc]
prefix = ""

[[overrides]]
prefixes = ["github.com/containerd/containerd/api/services/ttrpc/events/v1"]
generators = ["go", "go-ttrpc", "go-fieldpath"]

[overrides.parameters.go-ttrpc]
prefix = ""

[[overrides]]
# enable ttrpc and disable fieldpath and grpc for the shim
prefixes = [
Expand All @@ -35,6 +44,9 @@ prefixes = [
]
generators = ["go", "go-ttrpc"]

[overrides.parameters.go-ttrpc]
prefix = ""

# Aggregrate the API descriptors to lock down API changes.
[[descriptors]]
prefix = "github.com/containerd/containerd/api"
Expand Down
174 changes: 174 additions & 0 deletions api/services/containers/v1/containers_ttrpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit da799ae

Please sign in to comment.