github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/go-control-plane/envoy/service/tap/v2alpha/tap.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.25.0 4 // protoc v3.16.0 5 // source: envoy/service/tap/v2alpha/tap.proto 6 7 package envoy_service_tap_v2alpha 8 9 import ( 10 context "context" 11 _ "github.com/cncf/xds/go/udpa/annotations" 12 core "github.com/hxx258456/ccgo/go-control-plane/envoy/api/v2/core" 13 v2alpha "github.com/hxx258456/ccgo/go-control-plane/envoy/data/tap/v2alpha" 14 _ "github.com/envoyproxy/protoc-gen-validate/validate" 15 proto "github.com/golang/protobuf/proto" 16 grpc "github.com/hxx258456/ccgo/grpc" 17 codes "github.com/hxx258456/ccgo/grpc/codes" 18 status "github.com/hxx258456/ccgo/grpc/status" 19 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 20 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 21 reflect "reflect" 22 sync "sync" 23 ) 24 25 const ( 26 // Verify that this generated code is sufficiently up-to-date. 27 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 28 // Verify that runtime/protoimpl is sufficiently up-to-date. 29 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 30 ) 31 32 // This is a compile-time assertion that a sufficiently up-to-date version 33 // of the legacy proto package is being used. 34 const _ = proto.ProtoPackageIsVersion4 35 36 // [#not-implemented-hide:] Stream message for the Tap API. Envoy will open a stream to the server 37 // and stream taps without ever expecting a response. 38 type StreamTapsRequest struct { 39 state protoimpl.MessageState 40 sizeCache protoimpl.SizeCache 41 unknownFields protoimpl.UnknownFields 42 43 // Identifier data effectively is a structured metadata. As a performance optimization this will 44 // only be sent in the first message on the stream. 45 Identifier *StreamTapsRequest_Identifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` 46 // The trace id. this can be used to merge together a streaming trace. Note that the trace_id 47 // is not guaranteed to be spatially or temporally unique. 48 TraceId uint64 `protobuf:"varint,2,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` 49 // The trace data. 50 Trace *v2alpha.TraceWrapper `protobuf:"bytes,3,opt,name=trace,proto3" json:"trace,omitempty"` 51 } 52 53 func (x *StreamTapsRequest) Reset() { 54 *x = StreamTapsRequest{} 55 if protoimpl.UnsafeEnabled { 56 mi := &file_envoy_service_tap_v2alpha_tap_proto_msgTypes[0] 57 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 58 ms.StoreMessageInfo(mi) 59 } 60 } 61 62 func (x *StreamTapsRequest) String() string { 63 return protoimpl.X.MessageStringOf(x) 64 } 65 66 func (*StreamTapsRequest) ProtoMessage() {} 67 68 func (x *StreamTapsRequest) ProtoReflect() protoreflect.Message { 69 mi := &file_envoy_service_tap_v2alpha_tap_proto_msgTypes[0] 70 if protoimpl.UnsafeEnabled && x != nil { 71 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 72 if ms.LoadMessageInfo() == nil { 73 ms.StoreMessageInfo(mi) 74 } 75 return ms 76 } 77 return mi.MessageOf(x) 78 } 79 80 // Deprecated: Use StreamTapsRequest.ProtoReflect.Descriptor instead. 81 func (*StreamTapsRequest) Descriptor() ([]byte, []int) { 82 return file_envoy_service_tap_v2alpha_tap_proto_rawDescGZIP(), []int{0} 83 } 84 85 func (x *StreamTapsRequest) GetIdentifier() *StreamTapsRequest_Identifier { 86 if x != nil { 87 return x.Identifier 88 } 89 return nil 90 } 91 92 func (x *StreamTapsRequest) GetTraceId() uint64 { 93 if x != nil { 94 return x.TraceId 95 } 96 return 0 97 } 98 99 func (x *StreamTapsRequest) GetTrace() *v2alpha.TraceWrapper { 100 if x != nil { 101 return x.Trace 102 } 103 return nil 104 } 105 106 // [#not-implemented-hide:] 107 type StreamTapsResponse struct { 108 state protoimpl.MessageState 109 sizeCache protoimpl.SizeCache 110 unknownFields protoimpl.UnknownFields 111 } 112 113 func (x *StreamTapsResponse) Reset() { 114 *x = StreamTapsResponse{} 115 if protoimpl.UnsafeEnabled { 116 mi := &file_envoy_service_tap_v2alpha_tap_proto_msgTypes[1] 117 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 118 ms.StoreMessageInfo(mi) 119 } 120 } 121 122 func (x *StreamTapsResponse) String() string { 123 return protoimpl.X.MessageStringOf(x) 124 } 125 126 func (*StreamTapsResponse) ProtoMessage() {} 127 128 func (x *StreamTapsResponse) ProtoReflect() protoreflect.Message { 129 mi := &file_envoy_service_tap_v2alpha_tap_proto_msgTypes[1] 130 if protoimpl.UnsafeEnabled && x != nil { 131 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 132 if ms.LoadMessageInfo() == nil { 133 ms.StoreMessageInfo(mi) 134 } 135 return ms 136 } 137 return mi.MessageOf(x) 138 } 139 140 // Deprecated: Use StreamTapsResponse.ProtoReflect.Descriptor instead. 141 func (*StreamTapsResponse) Descriptor() ([]byte, []int) { 142 return file_envoy_service_tap_v2alpha_tap_proto_rawDescGZIP(), []int{1} 143 } 144 145 type StreamTapsRequest_Identifier struct { 146 state protoimpl.MessageState 147 sizeCache protoimpl.SizeCache 148 unknownFields protoimpl.UnknownFields 149 150 // The node sending taps over the stream. 151 Node *core.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` 152 // The opaque identifier that was set in the :ref:`output config 153 // <envoy_api_field_service.tap.v2alpha.StreamingGrpcSink.tap_id>`. 154 TapId string `protobuf:"bytes,2,opt,name=tap_id,json=tapId,proto3" json:"tap_id,omitempty"` 155 } 156 157 func (x *StreamTapsRequest_Identifier) Reset() { 158 *x = StreamTapsRequest_Identifier{} 159 if protoimpl.UnsafeEnabled { 160 mi := &file_envoy_service_tap_v2alpha_tap_proto_msgTypes[2] 161 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 162 ms.StoreMessageInfo(mi) 163 } 164 } 165 166 func (x *StreamTapsRequest_Identifier) String() string { 167 return protoimpl.X.MessageStringOf(x) 168 } 169 170 func (*StreamTapsRequest_Identifier) ProtoMessage() {} 171 172 func (x *StreamTapsRequest_Identifier) ProtoReflect() protoreflect.Message { 173 mi := &file_envoy_service_tap_v2alpha_tap_proto_msgTypes[2] 174 if protoimpl.UnsafeEnabled && x != nil { 175 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 176 if ms.LoadMessageInfo() == nil { 177 ms.StoreMessageInfo(mi) 178 } 179 return ms 180 } 181 return mi.MessageOf(x) 182 } 183 184 // Deprecated: Use StreamTapsRequest_Identifier.ProtoReflect.Descriptor instead. 185 func (*StreamTapsRequest_Identifier) Descriptor() ([]byte, []int) { 186 return file_envoy_service_tap_v2alpha_tap_proto_rawDescGZIP(), []int{0, 0} 187 } 188 189 func (x *StreamTapsRequest_Identifier) GetNode() *core.Node { 190 if x != nil { 191 return x.Node 192 } 193 return nil 194 } 195 196 func (x *StreamTapsRequest_Identifier) GetTapId() string { 197 if x != nil { 198 return x.TapId 199 } 200 return "" 201 } 202 203 var File_envoy_service_tap_v2alpha_tap_proto protoreflect.FileDescriptor 204 205 var file_envoy_service_tap_v2alpha_tap_proto_rawDesc = []byte{ 206 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 207 0x74, 0x61, 0x70, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x74, 0x61, 0x70, 0x2e, 208 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 209 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 210 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 211 0x6f, 0x72, 0x65, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 212 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 213 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x70, 214 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 215 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 216 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 217 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9f, 0x02, 0x0a, 218 0x11, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 219 0x73, 0x74, 0x12, 0x57, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 220 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 221 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 222 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 223 0x75, 0x65, 0x73, 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 224 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x74, 225 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x74, 226 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x3a, 0x0a, 0x05, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 227 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 228 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 229 0x72, 0x61, 0x63, 0x65, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x05, 0x74, 0x72, 0x61, 230 0x63, 0x65, 0x1a, 0x5a, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 231 0x12, 0x35, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 232 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 233 0x72, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 234 0x01, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x74, 0x61, 0x70, 0x5f, 0x69, 235 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x70, 0x49, 0x64, 0x22, 0x14, 236 0x0a, 0x12, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 237 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x7f, 0x0a, 0x0e, 0x54, 0x61, 0x70, 0x53, 0x69, 0x6e, 0x6b, 0x53, 238 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x0a, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 239 0x54, 0x61, 0x70, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 240 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 241 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 242 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 243 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 244 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 245 0x65, 0x22, 0x00, 0x28, 0x01, 0x42, 0x40, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 246 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 247 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 248 0x42, 0x08, 0x54, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 249 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 250 } 251 252 var ( 253 file_envoy_service_tap_v2alpha_tap_proto_rawDescOnce sync.Once 254 file_envoy_service_tap_v2alpha_tap_proto_rawDescData = file_envoy_service_tap_v2alpha_tap_proto_rawDesc 255 ) 256 257 func file_envoy_service_tap_v2alpha_tap_proto_rawDescGZIP() []byte { 258 file_envoy_service_tap_v2alpha_tap_proto_rawDescOnce.Do(func() { 259 file_envoy_service_tap_v2alpha_tap_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_tap_v2alpha_tap_proto_rawDescData) 260 }) 261 return file_envoy_service_tap_v2alpha_tap_proto_rawDescData 262 } 263 264 var file_envoy_service_tap_v2alpha_tap_proto_msgTypes = make([]protoimpl.MessageInfo, 3) 265 var file_envoy_service_tap_v2alpha_tap_proto_goTypes = []interface{}{ 266 (*StreamTapsRequest)(nil), // 0: envoy.service.tap.v2alpha.StreamTapsRequest 267 (*StreamTapsResponse)(nil), // 1: envoy.service.tap.v2alpha.StreamTapsResponse 268 (*StreamTapsRequest_Identifier)(nil), // 2: envoy.service.tap.v2alpha.StreamTapsRequest.Identifier 269 (*v2alpha.TraceWrapper)(nil), // 3: envoy.data.tap.v2alpha.TraceWrapper 270 (*core.Node)(nil), // 4: envoy.api.v2.core.Node 271 } 272 var file_envoy_service_tap_v2alpha_tap_proto_depIdxs = []int32{ 273 2, // 0: envoy.service.tap.v2alpha.StreamTapsRequest.identifier:type_name -> envoy.service.tap.v2alpha.StreamTapsRequest.Identifier 274 3, // 1: envoy.service.tap.v2alpha.StreamTapsRequest.trace:type_name -> envoy.data.tap.v2alpha.TraceWrapper 275 4, // 2: envoy.service.tap.v2alpha.StreamTapsRequest.Identifier.node:type_name -> envoy.api.v2.core.Node 276 0, // 3: envoy.service.tap.v2alpha.TapSinkService.StreamTaps:input_type -> envoy.service.tap.v2alpha.StreamTapsRequest 277 1, // 4: envoy.service.tap.v2alpha.TapSinkService.StreamTaps:output_type -> envoy.service.tap.v2alpha.StreamTapsResponse 278 4, // [4:5] is the sub-list for method output_type 279 3, // [3:4] is the sub-list for method input_type 280 3, // [3:3] is the sub-list for extension type_name 281 3, // [3:3] is the sub-list for extension extendee 282 0, // [0:3] is the sub-list for field type_name 283 } 284 285 func init() { file_envoy_service_tap_v2alpha_tap_proto_init() } 286 func file_envoy_service_tap_v2alpha_tap_proto_init() { 287 if File_envoy_service_tap_v2alpha_tap_proto != nil { 288 return 289 } 290 if !protoimpl.UnsafeEnabled { 291 file_envoy_service_tap_v2alpha_tap_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 292 switch v := v.(*StreamTapsRequest); i { 293 case 0: 294 return &v.state 295 case 1: 296 return &v.sizeCache 297 case 2: 298 return &v.unknownFields 299 default: 300 return nil 301 } 302 } 303 file_envoy_service_tap_v2alpha_tap_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 304 switch v := v.(*StreamTapsResponse); i { 305 case 0: 306 return &v.state 307 case 1: 308 return &v.sizeCache 309 case 2: 310 return &v.unknownFields 311 default: 312 return nil 313 } 314 } 315 file_envoy_service_tap_v2alpha_tap_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 316 switch v := v.(*StreamTapsRequest_Identifier); i { 317 case 0: 318 return &v.state 319 case 1: 320 return &v.sizeCache 321 case 2: 322 return &v.unknownFields 323 default: 324 return nil 325 } 326 } 327 } 328 type x struct{} 329 out := protoimpl.TypeBuilder{ 330 File: protoimpl.DescBuilder{ 331 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 332 RawDescriptor: file_envoy_service_tap_v2alpha_tap_proto_rawDesc, 333 NumEnums: 0, 334 NumMessages: 3, 335 NumExtensions: 0, 336 NumServices: 1, 337 }, 338 GoTypes: file_envoy_service_tap_v2alpha_tap_proto_goTypes, 339 DependencyIndexes: file_envoy_service_tap_v2alpha_tap_proto_depIdxs, 340 MessageInfos: file_envoy_service_tap_v2alpha_tap_proto_msgTypes, 341 }.Build() 342 File_envoy_service_tap_v2alpha_tap_proto = out.File 343 file_envoy_service_tap_v2alpha_tap_proto_rawDesc = nil 344 file_envoy_service_tap_v2alpha_tap_proto_goTypes = nil 345 file_envoy_service_tap_v2alpha_tap_proto_depIdxs = nil 346 } 347 348 // Reference imports to suppress errors if they are not otherwise used. 349 var _ context.Context 350 var _ grpc.ClientConnInterface 351 352 // This is a compile-time assertion to ensure that this generated file 353 // is compatible with the grpc package it is being compiled against. 354 const _ = grpc.SupportPackageIsVersion6 355 356 // TapSinkServiceClient is the client API for TapSinkService service. 357 // 358 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 359 type TapSinkServiceClient interface { 360 // Envoy will connect and send StreamTapsRequest messages forever. It does not expect any 361 // response to be sent as nothing would be done in the case of failure. The server should 362 // disconnect if it expects Envoy to reconnect. 363 StreamTaps(ctx context.Context, opts ...grpc.CallOption) (TapSinkService_StreamTapsClient, error) 364 } 365 366 type tapSinkServiceClient struct { 367 cc grpc.ClientConnInterface 368 } 369 370 func NewTapSinkServiceClient(cc grpc.ClientConnInterface) TapSinkServiceClient { 371 return &tapSinkServiceClient{cc} 372 } 373 374 func (c *tapSinkServiceClient) StreamTaps(ctx context.Context, opts ...grpc.CallOption) (TapSinkService_StreamTapsClient, error) { 375 stream, err := c.cc.NewStream(ctx, &_TapSinkService_serviceDesc.Streams[0], "/envoy.service.tap.v2alpha.TapSinkService/StreamTaps", opts...) 376 if err != nil { 377 return nil, err 378 } 379 x := &tapSinkServiceStreamTapsClient{stream} 380 return x, nil 381 } 382 383 type TapSinkService_StreamTapsClient interface { 384 Send(*StreamTapsRequest) error 385 CloseAndRecv() (*StreamTapsResponse, error) 386 grpc.ClientStream 387 } 388 389 type tapSinkServiceStreamTapsClient struct { 390 grpc.ClientStream 391 } 392 393 func (x *tapSinkServiceStreamTapsClient) Send(m *StreamTapsRequest) error { 394 return x.ClientStream.SendMsg(m) 395 } 396 397 func (x *tapSinkServiceStreamTapsClient) CloseAndRecv() (*StreamTapsResponse, error) { 398 if err := x.ClientStream.CloseSend(); err != nil { 399 return nil, err 400 } 401 m := new(StreamTapsResponse) 402 if err := x.ClientStream.RecvMsg(m); err != nil { 403 return nil, err 404 } 405 return m, nil 406 } 407 408 // TapSinkServiceServer is the server API for TapSinkService service. 409 type TapSinkServiceServer interface { 410 // Envoy will connect and send StreamTapsRequest messages forever. It does not expect any 411 // response to be sent as nothing would be done in the case of failure. The server should 412 // disconnect if it expects Envoy to reconnect. 413 StreamTaps(TapSinkService_StreamTapsServer) error 414 } 415 416 // UnimplementedTapSinkServiceServer can be embedded to have forward compatible implementations. 417 type UnimplementedTapSinkServiceServer struct { 418 } 419 420 func (*UnimplementedTapSinkServiceServer) StreamTaps(TapSinkService_StreamTapsServer) error { 421 return status.Errorf(codes.Unimplemented, "method StreamTaps not implemented") 422 } 423 424 func RegisterTapSinkServiceServer(s *grpc.Server, srv TapSinkServiceServer) { 425 s.RegisterService(&_TapSinkService_serviceDesc, srv) 426 } 427 428 func _TapSinkService_StreamTaps_Handler(srv interface{}, stream grpc.ServerStream) error { 429 return srv.(TapSinkServiceServer).StreamTaps(&tapSinkServiceStreamTapsServer{stream}) 430 } 431 432 type TapSinkService_StreamTapsServer interface { 433 SendAndClose(*StreamTapsResponse) error 434 Recv() (*StreamTapsRequest, error) 435 grpc.ServerStream 436 } 437 438 type tapSinkServiceStreamTapsServer struct { 439 grpc.ServerStream 440 } 441 442 func (x *tapSinkServiceStreamTapsServer) SendAndClose(m *StreamTapsResponse) error { 443 return x.ServerStream.SendMsg(m) 444 } 445 446 func (x *tapSinkServiceStreamTapsServer) Recv() (*StreamTapsRequest, error) { 447 m := new(StreamTapsRequest) 448 if err := x.ServerStream.RecvMsg(m); err != nil { 449 return nil, err 450 } 451 return m, nil 452 } 453 454 var _TapSinkService_serviceDesc = grpc.ServiceDesc{ 455 ServiceName: "envoy.service.tap.v2alpha.TapSinkService", 456 HandlerType: (*TapSinkServiceServer)(nil), 457 Methods: []grpc.MethodDesc{}, 458 Streams: []grpc.StreamDesc{ 459 { 460 StreamName: "StreamTaps", 461 Handler: _TapSinkService_StreamTaps_Handler, 462 ClientStreams: true, 463 }, 464 }, 465 Metadata: "envoy/service/tap/v2alpha/tap.proto", 466 }