After several requests for information about platform support, configuration introspection and feature switches, we now have a solution that should work in all these use cases. The Introspection API hooks into the plugin subsystem registration process. During registration, plugins declare several pieces of information, allowing clients to discover the cababilities and support that a containerd instance provides, including whether or not it loaded with an error. To allow symmetrical error reporting, the `google/rpc.Status` protobuf definitions have been brought in from the googleapis project. Unfortunately, we had to generate these in place to match our protobuf system. Once we like this design, we can add an implementation to integrate it directly with the plugin system. Enjoy! Signed-off-by: Stephen J Day <stephen.day@docker.com>
58 lines
2.1 KiB
TOML
58 lines
2.1 KiB
TOML
version = "unstable"
|
|
generator = "gogoctrd"
|
|
plugins = ["grpc", "fieldpath"]
|
|
|
|
# Control protoc include paths. Below are usually some good defaults, but feel
|
|
# free to try it without them if it works for your project.
|
|
[includes]
|
|
# Include paths that will be added before all others. Typically, you want to
|
|
# treat the root of the project as an include, but this may not be necessary.
|
|
before = ["./protobuf"]
|
|
|
|
# Paths that should be treated as include roots in relation to the vendor
|
|
# directory. These will be calculated with the vendor directory nearest the
|
|
# target package.
|
|
packages = ["github.com/gogo/protobuf"]
|
|
|
|
# Paths that will be added untouched to the end of the includes. We use
|
|
# `/usr/local/include` to pickup the common install location of protobuf.
|
|
# This is the default.
|
|
after = ["/usr/local/include"]
|
|
|
|
# This section maps protobuf imports to Go packages. These will become
|
|
# `-M` directives in the call to the go protobuf generator.
|
|
[packages]
|
|
"gogoproto/gogo.proto" = "github.com/gogo/protobuf/gogoproto"
|
|
"google/protobuf/any.proto" = "github.com/gogo/protobuf/types"
|
|
"google/protobuf/descriptor.proto" = "github.com/gogo/protobuf/protoc-gen-gogo/descriptor"
|
|
"google/protobuf/field_mask.proto" = "github.com/gogo/protobuf/types"
|
|
"google/protobuf/timestamp.proto" = "github.com/gogo/protobuf/types"
|
|
"google/protobuf/duration.proto" = "github.com/gogo/protobuf/types"
|
|
"google/rpc/status.proto" = "github.com/containerd/containerd/protobuf/google/rpc"
|
|
|
|
# Aggregrate the API descriptors to lock down API changes.
|
|
[[descriptors]]
|
|
prefix = "github.com/containerd/containerd/api"
|
|
target = "api/next.pb.txt"
|
|
ignore_files = [
|
|
"google/protobuf/descriptor.proto",
|
|
"gogoproto/gogo.proto"
|
|
]
|
|
|
|
# Lock down runc config
|
|
[[descriptors]]
|
|
prefix = "github.com/containerd/containerd/linux/runcopts"
|
|
target = "linux/runcopts/next.pb.txt"
|
|
ignore_files = [
|
|
"google/protobuf/descriptor.proto",
|
|
"gogoproto/gogo.proto"
|
|
]
|
|
|
|
[[descriptors]]
|
|
prefix = "github.com/containerd/containerd/windows/hcsshimopts"
|
|
target = "windows/hcsshimopts/next.pb.txt"
|
|
ignore_files = [
|
|
"google/protobuf/descriptor.proto",
|
|
"gogoproto/gogo.proto"
|
|
]
|