1
0

streams.pb.go 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497
  1. //
  2. // Copyright 2020 Docker Compose CLI authors
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. // http://www.apache.org/licenses/LICENSE-2.0
  7. // Unless required by applicable law or agreed to in writing, software
  8. // distributed under the License is distributed on an "AS IS" BASIS,
  9. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. // See the License for the specific language governing permissions and
  11. // limitations under the License.
  12. // Code generated by protoc-gen-go. DO NOT EDIT.
  13. // versions:
  14. // protoc-gen-go v1.25.0
  15. // protoc v3.13.0
  16. // source: cli/server/protos/streams/v1/streams.proto
  17. package v1
  18. import (
  19. context "context"
  20. proto "github.com/golang/protobuf/proto"
  21. any "github.com/golang/protobuf/ptypes/any"
  22. grpc "google.golang.org/grpc"
  23. codes "google.golang.org/grpc/codes"
  24. status "google.golang.org/grpc/status"
  25. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  26. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  27. reflect "reflect"
  28. sync "sync"
  29. )
  30. const (
  31. // Verify that this generated code is sufficiently up-to-date.
  32. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  33. // Verify that runtime/protoimpl is sufficiently up-to-date.
  34. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  35. )
  36. // This is a compile-time assertion that a sufficiently up-to-date version
  37. // of the legacy proto package is being used.
  38. const _ = proto.ProtoPackageIsVersion4
  39. type IOStream int32
  40. const (
  41. IOStream_STDIN IOStream = 0
  42. IOStream_STDOUT IOStream = 1
  43. IOStream_STDERR IOStream = 2
  44. )
  45. // Enum value maps for IOStream.
  46. var (
  47. IOStream_name = map[int32]string{
  48. 0: "STDIN",
  49. 1: "STDOUT",
  50. 2: "STDERR",
  51. }
  52. IOStream_value = map[string]int32{
  53. "STDIN": 0,
  54. "STDOUT": 1,
  55. "STDERR": 2,
  56. }
  57. )
  58. func (x IOStream) Enum() *IOStream {
  59. p := new(IOStream)
  60. *p = x
  61. return p
  62. }
  63. func (x IOStream) String() string {
  64. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  65. }
  66. func (IOStream) Descriptor() protoreflect.EnumDescriptor {
  67. return file_cli_server_protos_streams_v1_streams_proto_enumTypes[0].Descriptor()
  68. }
  69. func (IOStream) Type() protoreflect.EnumType {
  70. return &file_cli_server_protos_streams_v1_streams_proto_enumTypes[0]
  71. }
  72. func (x IOStream) Number() protoreflect.EnumNumber {
  73. return protoreflect.EnumNumber(x)
  74. }
  75. // Deprecated: Use IOStream.Descriptor instead.
  76. func (IOStream) EnumDescriptor() ([]byte, []int) {
  77. return file_cli_server_protos_streams_v1_streams_proto_rawDescGZIP(), []int{0}
  78. }
  79. type BytesMessage struct {
  80. state protoimpl.MessageState
  81. sizeCache protoimpl.SizeCache
  82. unknownFields protoimpl.UnknownFields
  83. Type IOStream `protobuf:"varint,1,opt,name=type,proto3,enum=com.docker.api.protos.streams.v1.IOStream" json:"type,omitempty"`
  84. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
  85. }
  86. func (x *BytesMessage) Reset() {
  87. *x = BytesMessage{}
  88. if protoimpl.UnsafeEnabled {
  89. mi := &file_cli_server_protos_streams_v1_streams_proto_msgTypes[0]
  90. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  91. ms.StoreMessageInfo(mi)
  92. }
  93. }
  94. func (x *BytesMessage) String() string {
  95. return protoimpl.X.MessageStringOf(x)
  96. }
  97. func (*BytesMessage) ProtoMessage() {}
  98. func (x *BytesMessage) ProtoReflect() protoreflect.Message {
  99. mi := &file_cli_server_protos_streams_v1_streams_proto_msgTypes[0]
  100. if protoimpl.UnsafeEnabled && x != nil {
  101. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  102. if ms.LoadMessageInfo() == nil {
  103. ms.StoreMessageInfo(mi)
  104. }
  105. return ms
  106. }
  107. return mi.MessageOf(x)
  108. }
  109. // Deprecated: Use BytesMessage.ProtoReflect.Descriptor instead.
  110. func (*BytesMessage) Descriptor() ([]byte, []int) {
  111. return file_cli_server_protos_streams_v1_streams_proto_rawDescGZIP(), []int{0}
  112. }
  113. func (x *BytesMessage) GetType() IOStream {
  114. if x != nil {
  115. return x.Type
  116. }
  117. return IOStream_STDIN
  118. }
  119. func (x *BytesMessage) GetValue() []byte {
  120. if x != nil {
  121. return x.Value
  122. }
  123. return nil
  124. }
  125. type ResizeMessage struct {
  126. state protoimpl.MessageState
  127. sizeCache protoimpl.SizeCache
  128. unknownFields protoimpl.UnknownFields
  129. Width uint32 `protobuf:"varint,1,opt,name=width,proto3" json:"width,omitempty"`
  130. Height uint32 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
  131. }
  132. func (x *ResizeMessage) Reset() {
  133. *x = ResizeMessage{}
  134. if protoimpl.UnsafeEnabled {
  135. mi := &file_cli_server_protos_streams_v1_streams_proto_msgTypes[1]
  136. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  137. ms.StoreMessageInfo(mi)
  138. }
  139. }
  140. func (x *ResizeMessage) String() string {
  141. return protoimpl.X.MessageStringOf(x)
  142. }
  143. func (*ResizeMessage) ProtoMessage() {}
  144. func (x *ResizeMessage) ProtoReflect() protoreflect.Message {
  145. mi := &file_cli_server_protos_streams_v1_streams_proto_msgTypes[1]
  146. if protoimpl.UnsafeEnabled && x != nil {
  147. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  148. if ms.LoadMessageInfo() == nil {
  149. ms.StoreMessageInfo(mi)
  150. }
  151. return ms
  152. }
  153. return mi.MessageOf(x)
  154. }
  155. // Deprecated: Use ResizeMessage.ProtoReflect.Descriptor instead.
  156. func (*ResizeMessage) Descriptor() ([]byte, []int) {
  157. return file_cli_server_protos_streams_v1_streams_proto_rawDescGZIP(), []int{1}
  158. }
  159. func (x *ResizeMessage) GetWidth() uint32 {
  160. if x != nil {
  161. return x.Width
  162. }
  163. return 0
  164. }
  165. func (x *ResizeMessage) GetHeight() uint32 {
  166. if x != nil {
  167. return x.Height
  168. }
  169. return 0
  170. }
  171. type ExitMessage struct {
  172. state protoimpl.MessageState
  173. sizeCache protoimpl.SizeCache
  174. unknownFields protoimpl.UnknownFields
  175. Status uint32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
  176. }
  177. func (x *ExitMessage) Reset() {
  178. *x = ExitMessage{}
  179. if protoimpl.UnsafeEnabled {
  180. mi := &file_cli_server_protos_streams_v1_streams_proto_msgTypes[2]
  181. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  182. ms.StoreMessageInfo(mi)
  183. }
  184. }
  185. func (x *ExitMessage) String() string {
  186. return protoimpl.X.MessageStringOf(x)
  187. }
  188. func (*ExitMessage) ProtoMessage() {}
  189. func (x *ExitMessage) ProtoReflect() protoreflect.Message {
  190. mi := &file_cli_server_protos_streams_v1_streams_proto_msgTypes[2]
  191. if protoimpl.UnsafeEnabled && x != nil {
  192. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  193. if ms.LoadMessageInfo() == nil {
  194. ms.StoreMessageInfo(mi)
  195. }
  196. return ms
  197. }
  198. return mi.MessageOf(x)
  199. }
  200. // Deprecated: Use ExitMessage.ProtoReflect.Descriptor instead.
  201. func (*ExitMessage) Descriptor() ([]byte, []int) {
  202. return file_cli_server_protos_streams_v1_streams_proto_rawDescGZIP(), []int{2}
  203. }
  204. func (x *ExitMessage) GetStatus() uint32 {
  205. if x != nil {
  206. return x.Status
  207. }
  208. return 0
  209. }
  210. var File_cli_server_protos_streams_v1_streams_proto protoreflect.FileDescriptor
  211. var file_cli_server_protos_streams_v1_streams_proto_rawDesc = []byte{
  212. 0x0a, 0x2a, 0x63, 0x6c, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f,
  213. 0x74, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73,
  214. 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x63, 0x6f,
  215. 0x6d, 0x2e, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f,
  216. 0x74, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x19,
  217. 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f,
  218. 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x64, 0x0a, 0x0c, 0x42, 0x79, 0x74,
  219. 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3e, 0x0a, 0x04, 0x74, 0x79, 0x70,
  220. 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6f,
  221. 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e,
  222. 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x4f, 0x53, 0x74, 0x72,
  223. 0x65, 0x61, 0x6d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
  224. 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22,
  225. 0x3d, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
  226. 0x12, 0x14, 0x0a, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52,
  227. 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74,
  228. 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x25,
  229. 0x0a, 0x0b, 0x45, 0x78, 0x69, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a,
  230. 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x73,
  231. 0x74, 0x61, 0x74, 0x75, 0x73, 0x2a, 0x2d, 0x0a, 0x08, 0x49, 0x4f, 0x53, 0x74, 0x72, 0x65, 0x61,
  232. 0x6d, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x54, 0x44, 0x49, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06,
  233. 0x53, 0x54, 0x44, 0x4f, 0x55, 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x44, 0x45,
  234. 0x52, 0x52, 0x10, 0x02, 0x32, 0x48, 0x0a, 0x09, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e,
  235. 0x67, 0x12, 0x3b, 0x0a, 0x09, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x14,
  236. 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
  237. 0x2e, 0x41, 0x6e, 0x79, 0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
  238. 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x28, 0x01, 0x30, 0x01, 0x42, 0x3f,
  239. 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x6f, 0x63,
  240. 0x6b, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x2d, 0x63, 0x6c, 0x69, 0x2f,
  241. 0x63, 0x6c, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
  242. 0x73, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62,
  243. 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  244. }
  245. var (
  246. file_cli_server_protos_streams_v1_streams_proto_rawDescOnce sync.Once
  247. file_cli_server_protos_streams_v1_streams_proto_rawDescData = file_cli_server_protos_streams_v1_streams_proto_rawDesc
  248. )
  249. func file_cli_server_protos_streams_v1_streams_proto_rawDescGZIP() []byte {
  250. file_cli_server_protos_streams_v1_streams_proto_rawDescOnce.Do(func() {
  251. file_cli_server_protos_streams_v1_streams_proto_rawDescData = protoimpl.X.CompressGZIP(file_cli_server_protos_streams_v1_streams_proto_rawDescData)
  252. })
  253. return file_cli_server_protos_streams_v1_streams_proto_rawDescData
  254. }
  255. var file_cli_server_protos_streams_v1_streams_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
  256. var file_cli_server_protos_streams_v1_streams_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
  257. var file_cli_server_protos_streams_v1_streams_proto_goTypes = []interface{}{
  258. (IOStream)(0), // 0: com.docker.api.protos.streams.v1.IOStream
  259. (*BytesMessage)(nil), // 1: com.docker.api.protos.streams.v1.BytesMessage
  260. (*ResizeMessage)(nil), // 2: com.docker.api.protos.streams.v1.ResizeMessage
  261. (*ExitMessage)(nil), // 3: com.docker.api.protos.streams.v1.ExitMessage
  262. (*any.Any)(nil), // 4: google.protobuf.Any
  263. }
  264. var file_cli_server_protos_streams_v1_streams_proto_depIdxs = []int32{
  265. 0, // 0: com.docker.api.protos.streams.v1.BytesMessage.type:type_name -> com.docker.api.protos.streams.v1.IOStream
  266. 4, // 1: com.docker.api.protos.streams.v1.Streaming.NewStream:input_type -> google.protobuf.Any
  267. 4, // 2: com.docker.api.protos.streams.v1.Streaming.NewStream:output_type -> google.protobuf.Any
  268. 2, // [2:3] is the sub-list for method output_type
  269. 1, // [1:2] is the sub-list for method input_type
  270. 1, // [1:1] is the sub-list for extension type_name
  271. 1, // [1:1] is the sub-list for extension extendee
  272. 0, // [0:1] is the sub-list for field type_name
  273. }
  274. func init() { file_cli_server_protos_streams_v1_streams_proto_init() }
  275. func file_cli_server_protos_streams_v1_streams_proto_init() {
  276. if File_cli_server_protos_streams_v1_streams_proto != nil {
  277. return
  278. }
  279. if !protoimpl.UnsafeEnabled {
  280. file_cli_server_protos_streams_v1_streams_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  281. switch v := v.(*BytesMessage); i {
  282. case 0:
  283. return &v.state
  284. case 1:
  285. return &v.sizeCache
  286. case 2:
  287. return &v.unknownFields
  288. default:
  289. return nil
  290. }
  291. }
  292. file_cli_server_protos_streams_v1_streams_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  293. switch v := v.(*ResizeMessage); i {
  294. case 0:
  295. return &v.state
  296. case 1:
  297. return &v.sizeCache
  298. case 2:
  299. return &v.unknownFields
  300. default:
  301. return nil
  302. }
  303. }
  304. file_cli_server_protos_streams_v1_streams_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  305. switch v := v.(*ExitMessage); i {
  306. case 0:
  307. return &v.state
  308. case 1:
  309. return &v.sizeCache
  310. case 2:
  311. return &v.unknownFields
  312. default:
  313. return nil
  314. }
  315. }
  316. }
  317. type x struct{}
  318. out := protoimpl.TypeBuilder{
  319. File: protoimpl.DescBuilder{
  320. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  321. RawDescriptor: file_cli_server_protos_streams_v1_streams_proto_rawDesc,
  322. NumEnums: 1,
  323. NumMessages: 3,
  324. NumExtensions: 0,
  325. NumServices: 1,
  326. },
  327. GoTypes: file_cli_server_protos_streams_v1_streams_proto_goTypes,
  328. DependencyIndexes: file_cli_server_protos_streams_v1_streams_proto_depIdxs,
  329. EnumInfos: file_cli_server_protos_streams_v1_streams_proto_enumTypes,
  330. MessageInfos: file_cli_server_protos_streams_v1_streams_proto_msgTypes,
  331. }.Build()
  332. File_cli_server_protos_streams_v1_streams_proto = out.File
  333. file_cli_server_protos_streams_v1_streams_proto_rawDesc = nil
  334. file_cli_server_protos_streams_v1_streams_proto_goTypes = nil
  335. file_cli_server_protos_streams_v1_streams_proto_depIdxs = nil
  336. }
  337. // Reference imports to suppress errors if they are not otherwise used.
  338. var _ context.Context
  339. var _ grpc.ClientConnInterface
  340. // This is a compile-time assertion to ensure that this generated file
  341. // is compatible with the grpc package it is being compiled against.
  342. const _ = grpc.SupportPackageIsVersion6
  343. // StreamingClient is the client API for Streaming service.
  344. //
  345. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  346. type StreamingClient interface {
  347. NewStream(ctx context.Context, opts ...grpc.CallOption) (Streaming_NewStreamClient, error)
  348. }
  349. type streamingClient struct {
  350. cc grpc.ClientConnInterface
  351. }
  352. func NewStreamingClient(cc grpc.ClientConnInterface) StreamingClient {
  353. return &streamingClient{cc}
  354. }
  355. func (c *streamingClient) NewStream(ctx context.Context, opts ...grpc.CallOption) (Streaming_NewStreamClient, error) {
  356. stream, err := c.cc.NewStream(ctx, &_Streaming_serviceDesc.Streams[0], "/com.docker.api.protos.streams.v1.Streaming/NewStream", opts...)
  357. if err != nil {
  358. return nil, err
  359. }
  360. x := &streamingNewStreamClient{stream}
  361. return x, nil
  362. }
  363. type Streaming_NewStreamClient interface {
  364. Send(*any.Any) error
  365. Recv() (*any.Any, error)
  366. grpc.ClientStream
  367. }
  368. type streamingNewStreamClient struct {
  369. grpc.ClientStream
  370. }
  371. func (x *streamingNewStreamClient) Send(m *any.Any) error {
  372. return x.ClientStream.SendMsg(m)
  373. }
  374. func (x *streamingNewStreamClient) Recv() (*any.Any, error) {
  375. m := new(any.Any)
  376. if err := x.ClientStream.RecvMsg(m); err != nil {
  377. return nil, err
  378. }
  379. return m, nil
  380. }
  381. // StreamingServer is the server API for Streaming service.
  382. type StreamingServer interface {
  383. NewStream(Streaming_NewStreamServer) error
  384. }
  385. // UnimplementedStreamingServer can be embedded to have forward compatible implementations.
  386. type UnimplementedStreamingServer struct {
  387. }
  388. func (*UnimplementedStreamingServer) NewStream(Streaming_NewStreamServer) error {
  389. return status.Errorf(codes.Unimplemented, "method NewStream not implemented")
  390. }
  391. func RegisterStreamingServer(s *grpc.Server, srv StreamingServer) {
  392. s.RegisterService(&_Streaming_serviceDesc, srv)
  393. }
  394. func _Streaming_NewStream_Handler(srv interface{}, stream grpc.ServerStream) error {
  395. return srv.(StreamingServer).NewStream(&streamingNewStreamServer{stream})
  396. }
  397. type Streaming_NewStreamServer interface {
  398. Send(*any.Any) error
  399. Recv() (*any.Any, error)
  400. grpc.ServerStream
  401. }
  402. type streamingNewStreamServer struct {
  403. grpc.ServerStream
  404. }
  405. func (x *streamingNewStreamServer) Send(m *any.Any) error {
  406. return x.ServerStream.SendMsg(m)
  407. }
  408. func (x *streamingNewStreamServer) Recv() (*any.Any, error) {
  409. m := new(any.Any)
  410. if err := x.ServerStream.RecvMsg(m); err != nil {
  411. return nil, err
  412. }
  413. return m, nil
  414. }
  415. var _Streaming_serviceDesc = grpc.ServiceDesc{
  416. ServiceName: "com.docker.api.protos.streams.v1.Streaming",
  417. HandlerType: (*StreamingServer)(nil),
  418. Methods: []grpc.MethodDesc{},
  419. Streams: []grpc.StreamDesc{
  420. {
  421. StreamName: "NewStream",
  422. Handler: _Streaming_NewStream_Handler,
  423. ServerStreams: true,
  424. ClientStreams: true,
  425. },
  426. },
  427. Metadata: "cli/server/protos/streams/v1/streams.proto",
  428. }