Skip to content

Commit 475619c

Browse files
authored
Merge pull request #3195 from crosbymichael/ttrpc-love
Use ttrpc in the daemon for event publishing from shims
2 parents db3a863 + a6f587e commit 475619c

18 files changed

Lines changed: 740 additions & 92 deletions

File tree

Protobuild.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ plugins = ["grpc", "fieldpath"]
3535
prefixes = ["github.com/containerd/containerd/api/events"]
3636
plugins = ["fieldpath"] # disable grpc for this package
3737

38+
[[overrides]]
39+
prefixes = ["github.com/containerd/containerd/api/services/ttrpc/events/v1"]
40+
plugins = ["ttrpc", "fieldpath"]
41+
3842
[[overrides]]
3943
# enable ttrpc and disable fieldpath and grpc for the shim
4044
prefixes = ["github.com/containerd/containerd/runtime/v1/shim/v1", "github.com/containerd/containerd/runtime/v2/task"]

api/next.pb.txt

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4202,6 +4202,47 @@ file {
42024202
weak_dependency: 2
42034203
syntax: "proto3"
42044204
}
4205+
file {
4206+
name: "github.com/containerd/containerd/api/services/ttrpc/events/v1/events.proto"
4207+
package: "containerd.services.events.ttrpc.v1"
4208+
dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto"
4209+
dependency: "gogoproto/gogo.proto"
4210+
dependency: "google/protobuf/any.proto"
4211+
dependency: "google/protobuf/empty.proto"
4212+
dependency: "google/protobuf/timestamp.proto"
4213+
message_type {
4214+
name: "PublishRequest"
4215+
field {
4216+
name: "topic"
4217+
number: 1
4218+
label: LABEL_OPTIONAL
4219+
type: TYPE_STRING
4220+
json_name: "topic"
4221+
}
4222+
field {
4223+
name: "event"
4224+
number: 2
4225+
label: LABEL_OPTIONAL
4226+
type: TYPE_MESSAGE
4227+
type_name: ".google.protobuf.Any"
4228+
json_name: "event"
4229+
}
4230+
}
4231+
service {
4232+
name: "Events"
4233+
method {
4234+
name: "Publish"
4235+
input_type: ".containerd.services.events.ttrpc.v1.PublishRequest"
4236+
output_type: ".google.protobuf.Empty"
4237+
}
4238+
}
4239+
options {
4240+
go_package: "github.com/containerd/containerd/api/services/ttrpc/events/v1;events"
4241+
}
4242+
weak_dependency: 0
4243+
weak_dependency: 1
4244+
syntax: "proto3"
4245+
}
42054246
file {
42064247
name: "github.com/containerd/containerd/api/services/version/v1/version.proto"
42074248
package: "containerd.services.version.v1"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
Copyright The containerd Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
// Package events defines the event pushing and subscription service.
18+
package events

0 commit comments

Comments
 (0)