Skip to content

Commit

Permalink
Add streaming service
Browse files Browse the repository at this point in the history
Adds a service capable of streaming Any objects bi-directionally.
This can be used by services to send data, received data, or to
initiate requests from server to client.

Signed-off-by: Derek McGowan <derek@mcg.dev>
  • Loading branch information
dmcgowan committed Nov 30, 2022
1 parent c469f67 commit dcf5687
Show file tree
Hide file tree
Showing 12 changed files with 826 additions and 0 deletions.
30 changes: 30 additions & 0 deletions api/next.pb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4972,6 +4972,36 @@ file {
}
syntax: "proto3"
}
file {
name: "github.com/containerd/containerd/api/services/streaming/v1/streaming.proto"
package: "containerd.services.streaming.v1"
dependency: "gogoproto/gogo.proto"
dependency: "google/protobuf/any.proto"
message_type {
name: "StreamInit"
field {
name: "id"
number: 1
label: LABEL_OPTIONAL
type: TYPE_STRING
json_name: "id"
}
}
service {
name: "Streaming"
method {
name: "Stream"
input_type: ".google.protobuf.Any"
output_type: ".google.protobuf.Any"
client_streaming: true
server_streaming: true
}
}
options {
go_package: "github.com/containerd/containerd/api/services/streaming/v1;streaming"
}
syntax: "proto3"
}
file {
name: "github.com/containerd/containerd/api/types/metrics.proto"
package: "containerd.types"
Expand Down
17 changes: 17 additions & 0 deletions api/services/streaming/v1/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package streaming
175 changes: 175 additions & 0 deletions api/services/streaming/v1/streaming.pb.go

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

31 changes: 31 additions & 0 deletions api/services/streaming/v1/streaming.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

syntax = "proto3";

package containerd.services.streaming.v1;

import "google/protobuf/any.proto";

option go_package = "github.com/containerd/containerd/api/services/streaming/v1;streaming";

service Streaming {
rpc Stream(stream google.protobuf.Any) returns (stream google.protobuf.Any);
}

message StreamInit {
string id = 1;
}
Loading

0 comments on commit dcf5687

Please sign in to comment.