Skip to content

Commit

Permalink
Update protobuild to build ttrpc services
Browse files Browse the repository at this point in the history
Signed-off-by: Derek McGowan <derek@mcg.dev>
  • Loading branch information
dmcgowan committed Feb 21, 2024
1 parent 4510ca3 commit 65031ea
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
20 changes: 13 additions & 7 deletions api/Protobuild.toml
@@ -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,39 +18,45 @@ 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"]

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

[[overrides]]
# enable ttrpc and disable fieldpath and grpc for the shim
prefixes = [
"github.com/containerd/containerd/api/runtime/task/v2",
]
generators = ["go", "go-ttrpc"]

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

[[overrides]]
prefixes = [
"github.com/containerd/containerd/api/runtime/sandbox/v1",
]
generators = ["go", "go-ttrpc", "go-grpc"]

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

[[overrides]]
prefixes = [
"github.com/containerd/containerd/api/runtime/task/v3",
]
generators = ["go", "go-ttrpc", "go-grpc"]

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

# Aggregrate the API descriptors to lock down API changes.
[[descriptors]]
prefix = "github.com/containerd/containerd/api"
Expand Down
2 changes: 1 addition & 1 deletion script/setup/install-dev-tools
Expand Up @@ -26,4 +26,4 @@ go install github.com/cpuguy83/go-md2man/v2@v2.0.2
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.2
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
go install github.com/containerd/ttrpc/cmd/protoc-gen-go-ttrpc@5cc9169d1fc1a8292866224ae09dc47827801874
go install github.com/containerd/ttrpc/cmd/protoc-gen-go-ttrpc@faba5896a9c4d7b65495cb9b2c02531feb1434d6

0 comments on commit 65031ea

Please sign in to comment.