github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/go-control-plane/envoy/service/trace/v3/trace_service.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/trace/v3/trace_service.proto 6 7 package envoy_service_trace_v3 8 9 import ( 10 context "context" 11 v1 "github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1" 12 _ "github.com/cncf/xds/go/udpa/annotations" 13 v3 "github.com/hxx258456/ccgo/go-control-plane/envoy/config/core/v3" 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 type StreamTracesResponse struct { 37 state protoimpl.MessageState 38 sizeCache protoimpl.SizeCache 39 unknownFields protoimpl.UnknownFields 40 } 41 42 func (x *StreamTracesResponse) Reset() { 43 *x = StreamTracesResponse{} 44 if protoimpl.UnsafeEnabled { 45 mi := &file_envoy_service_trace_v3_trace_service_proto_msgTypes[0] 46 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 47 ms.StoreMessageInfo(mi) 48 } 49 } 50 51 func (x *StreamTracesResponse) String() string { 52 return protoimpl.X.MessageStringOf(x) 53 } 54 55 func (*StreamTracesResponse) ProtoMessage() {} 56 57 func (x *StreamTracesResponse) ProtoReflect() protoreflect.Message { 58 mi := &file_envoy_service_trace_v3_trace_service_proto_msgTypes[0] 59 if protoimpl.UnsafeEnabled && x != nil { 60 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 61 if ms.LoadMessageInfo() == nil { 62 ms.StoreMessageInfo(mi) 63 } 64 return ms 65 } 66 return mi.MessageOf(x) 67 } 68 69 // Deprecated: Use StreamTracesResponse.ProtoReflect.Descriptor instead. 70 func (*StreamTracesResponse) Descriptor() ([]byte, []int) { 71 return file_envoy_service_trace_v3_trace_service_proto_rawDescGZIP(), []int{0} 72 } 73 74 type StreamTracesMessage struct { 75 state protoimpl.MessageState 76 sizeCache protoimpl.SizeCache 77 unknownFields protoimpl.UnknownFields 78 79 // Identifier data effectively is a structured metadata. 80 // As a performance optimization this will only be sent in the first message 81 // on the stream. 82 Identifier *StreamTracesMessage_Identifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` 83 // A list of Span entries 84 Spans []*v1.Span `protobuf:"bytes,2,rep,name=spans,proto3" json:"spans,omitempty"` 85 } 86 87 func (x *StreamTracesMessage) Reset() { 88 *x = StreamTracesMessage{} 89 if protoimpl.UnsafeEnabled { 90 mi := &file_envoy_service_trace_v3_trace_service_proto_msgTypes[1] 91 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 92 ms.StoreMessageInfo(mi) 93 } 94 } 95 96 func (x *StreamTracesMessage) String() string { 97 return protoimpl.X.MessageStringOf(x) 98 } 99 100 func (*StreamTracesMessage) ProtoMessage() {} 101 102 func (x *StreamTracesMessage) ProtoReflect() protoreflect.Message { 103 mi := &file_envoy_service_trace_v3_trace_service_proto_msgTypes[1] 104 if protoimpl.UnsafeEnabled && x != nil { 105 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 106 if ms.LoadMessageInfo() == nil { 107 ms.StoreMessageInfo(mi) 108 } 109 return ms 110 } 111 return mi.MessageOf(x) 112 } 113 114 // Deprecated: Use StreamTracesMessage.ProtoReflect.Descriptor instead. 115 func (*StreamTracesMessage) Descriptor() ([]byte, []int) { 116 return file_envoy_service_trace_v3_trace_service_proto_rawDescGZIP(), []int{1} 117 } 118 119 func (x *StreamTracesMessage) GetIdentifier() *StreamTracesMessage_Identifier { 120 if x != nil { 121 return x.Identifier 122 } 123 return nil 124 } 125 126 func (x *StreamTracesMessage) GetSpans() []*v1.Span { 127 if x != nil { 128 return x.Spans 129 } 130 return nil 131 } 132 133 type StreamTracesMessage_Identifier struct { 134 state protoimpl.MessageState 135 sizeCache protoimpl.SizeCache 136 unknownFields protoimpl.UnknownFields 137 138 // The node sending the access log messages over the stream. 139 Node *v3.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` 140 } 141 142 func (x *StreamTracesMessage_Identifier) Reset() { 143 *x = StreamTracesMessage_Identifier{} 144 if protoimpl.UnsafeEnabled { 145 mi := &file_envoy_service_trace_v3_trace_service_proto_msgTypes[2] 146 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 147 ms.StoreMessageInfo(mi) 148 } 149 } 150 151 func (x *StreamTracesMessage_Identifier) String() string { 152 return protoimpl.X.MessageStringOf(x) 153 } 154 155 func (*StreamTracesMessage_Identifier) ProtoMessage() {} 156 157 func (x *StreamTracesMessage_Identifier) ProtoReflect() protoreflect.Message { 158 mi := &file_envoy_service_trace_v3_trace_service_proto_msgTypes[2] 159 if protoimpl.UnsafeEnabled && x != nil { 160 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 161 if ms.LoadMessageInfo() == nil { 162 ms.StoreMessageInfo(mi) 163 } 164 return ms 165 } 166 return mi.MessageOf(x) 167 } 168 169 // Deprecated: Use StreamTracesMessage_Identifier.ProtoReflect.Descriptor instead. 170 func (*StreamTracesMessage_Identifier) Descriptor() ([]byte, []int) { 171 return file_envoy_service_trace_v3_trace_service_proto_rawDescGZIP(), []int{1, 0} 172 } 173 174 func (x *StreamTracesMessage_Identifier) GetNode() *v3.Node { 175 if x != nil { 176 return x.Node 177 } 178 return nil 179 } 180 181 var File_envoy_service_trace_v3_trace_service_proto protoreflect.FileDescriptor 182 183 var file_envoy_service_trace_v3_trace_service_proto_rawDesc = []byte{ 184 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 185 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x73, 186 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x65, 0x6e, 187 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 188 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 189 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 190 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 191 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x31, 192 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 193 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 194 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 195 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 196 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 197 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 198 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4a, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 199 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 200 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 201 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, 202 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 203 0x6e, 0x73, 0x65, 0x22, 0xde, 0x02, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 204 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x56, 0x0a, 0x0a, 0x69, 205 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 206 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 207 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 208 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, 209 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 210 0x69, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x05, 0x73, 0x70, 0x61, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 211 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 212 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 213 0x70, 0x61, 0x6e, 0x52, 0x05, 0x73, 0x70, 0x61, 0x6e, 0x73, 0x1a, 0x84, 0x01, 0x0a, 0x0a, 0x49, 214 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 215 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 216 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 217 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 218 0x6f, 0x64, 0x65, 0x3a, 0x3c, 0x9a, 0xc5, 0x88, 0x1e, 0x37, 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 219 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 220 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, 221 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 222 0x72, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 223 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 224 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, 225 0x73, 0x61, 0x67, 0x65, 0x32, 0x7d, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 226 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 227 0x61, 0x63, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 228 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 229 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 230 0x65, 0x1a, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 231 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 232 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 233 0x00, 0x28, 0x01, 0x42, 0x46, 0x0a, 0x24, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 234 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 235 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x11, 0x54, 0x72, 0x61, 236 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 237 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 238 0x74, 0x6f, 0x33, 239 } 240 241 var ( 242 file_envoy_service_trace_v3_trace_service_proto_rawDescOnce sync.Once 243 file_envoy_service_trace_v3_trace_service_proto_rawDescData = file_envoy_service_trace_v3_trace_service_proto_rawDesc 244 ) 245 246 func file_envoy_service_trace_v3_trace_service_proto_rawDescGZIP() []byte { 247 file_envoy_service_trace_v3_trace_service_proto_rawDescOnce.Do(func() { 248 file_envoy_service_trace_v3_trace_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_trace_v3_trace_service_proto_rawDescData) 249 }) 250 return file_envoy_service_trace_v3_trace_service_proto_rawDescData 251 } 252 253 var file_envoy_service_trace_v3_trace_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) 254 var file_envoy_service_trace_v3_trace_service_proto_goTypes = []interface{}{ 255 (*StreamTracesResponse)(nil), // 0: envoy.service.trace.v3.StreamTracesResponse 256 (*StreamTracesMessage)(nil), // 1: envoy.service.trace.v3.StreamTracesMessage 257 (*StreamTracesMessage_Identifier)(nil), // 2: envoy.service.trace.v3.StreamTracesMessage.Identifier 258 (*v1.Span)(nil), // 3: opencensus.proto.trace.v1.Span 259 (*v3.Node)(nil), // 4: envoy.config.core.v3.Node 260 } 261 var file_envoy_service_trace_v3_trace_service_proto_depIdxs = []int32{ 262 2, // 0: envoy.service.trace.v3.StreamTracesMessage.identifier:type_name -> envoy.service.trace.v3.StreamTracesMessage.Identifier 263 3, // 1: envoy.service.trace.v3.StreamTracesMessage.spans:type_name -> opencensus.proto.trace.v1.Span 264 4, // 2: envoy.service.trace.v3.StreamTracesMessage.Identifier.node:type_name -> envoy.config.core.v3.Node 265 1, // 3: envoy.service.trace.v3.TraceService.StreamTraces:input_type -> envoy.service.trace.v3.StreamTracesMessage 266 0, // 4: envoy.service.trace.v3.TraceService.StreamTraces:output_type -> envoy.service.trace.v3.StreamTracesResponse 267 4, // [4:5] is the sub-list for method output_type 268 3, // [3:4] is the sub-list for method input_type 269 3, // [3:3] is the sub-list for extension type_name 270 3, // [3:3] is the sub-list for extension extendee 271 0, // [0:3] is the sub-list for field type_name 272 } 273 274 func init() { file_envoy_service_trace_v3_trace_service_proto_init() } 275 func file_envoy_service_trace_v3_trace_service_proto_init() { 276 if File_envoy_service_trace_v3_trace_service_proto != nil { 277 return 278 } 279 if !protoimpl.UnsafeEnabled { 280 file_envoy_service_trace_v3_trace_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 281 switch v := v.(*StreamTracesResponse); 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_envoy_service_trace_v3_trace_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 293 switch v := v.(*StreamTracesMessage); 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_envoy_service_trace_v3_trace_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 305 switch v := v.(*StreamTracesMessage_Identifier); 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_envoy_service_trace_v3_trace_service_proto_rawDesc, 322 NumEnums: 0, 323 NumMessages: 3, 324 NumExtensions: 0, 325 NumServices: 1, 326 }, 327 GoTypes: file_envoy_service_trace_v3_trace_service_proto_goTypes, 328 DependencyIndexes: file_envoy_service_trace_v3_trace_service_proto_depIdxs, 329 MessageInfos: file_envoy_service_trace_v3_trace_service_proto_msgTypes, 330 }.Build() 331 File_envoy_service_trace_v3_trace_service_proto = out.File 332 file_envoy_service_trace_v3_trace_service_proto_rawDesc = nil 333 file_envoy_service_trace_v3_trace_service_proto_goTypes = nil 334 file_envoy_service_trace_v3_trace_service_proto_depIdxs = nil 335 } 336 337 // Reference imports to suppress errors if they are not otherwise used. 338 var _ context.Context 339 var _ grpc.ClientConnInterface 340 341 // This is a compile-time assertion to ensure that this generated file 342 // is compatible with the grpc package it is being compiled against. 343 const _ = grpc.SupportPackageIsVersion6 344 345 // TraceServiceClient is the client API for TraceService service. 346 // 347 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 348 type TraceServiceClient interface { 349 // Envoy will connect and send StreamTracesMessage messages forever. It does 350 // not expect any response to be sent as nothing would be done in the case 351 // of failure. 352 StreamTraces(ctx context.Context, opts ...grpc.CallOption) (TraceService_StreamTracesClient, error) 353 } 354 355 type traceServiceClient struct { 356 cc grpc.ClientConnInterface 357 } 358 359 func NewTraceServiceClient(cc grpc.ClientConnInterface) TraceServiceClient { 360 return &traceServiceClient{cc} 361 } 362 363 func (c *traceServiceClient) StreamTraces(ctx context.Context, opts ...grpc.CallOption) (TraceService_StreamTracesClient, error) { 364 stream, err := c.cc.NewStream(ctx, &_TraceService_serviceDesc.Streams[0], "/envoy.service.trace.v3.TraceService/StreamTraces", opts...) 365 if err != nil { 366 return nil, err 367 } 368 x := &traceServiceStreamTracesClient{stream} 369 return x, nil 370 } 371 372 type TraceService_StreamTracesClient interface { 373 Send(*StreamTracesMessage) error 374 CloseAndRecv() (*StreamTracesResponse, error) 375 grpc.ClientStream 376 } 377 378 type traceServiceStreamTracesClient struct { 379 grpc.ClientStream 380 } 381 382 func (x *traceServiceStreamTracesClient) Send(m *StreamTracesMessage) error { 383 return x.ClientStream.SendMsg(m) 384 } 385 386 func (x *traceServiceStreamTracesClient) CloseAndRecv() (*StreamTracesResponse, error) { 387 if err := x.ClientStream.CloseSend(); err != nil { 388 return nil, err 389 } 390 m := new(StreamTracesResponse) 391 if err := x.ClientStream.RecvMsg(m); err != nil { 392 return nil, err 393 } 394 return m, nil 395 } 396 397 // TraceServiceServer is the server API for TraceService service. 398 type TraceServiceServer interface { 399 // Envoy will connect and send StreamTracesMessage messages forever. It does 400 // not expect any response to be sent as nothing would be done in the case 401 // of failure. 402 StreamTraces(TraceService_StreamTracesServer) error 403 } 404 405 // UnimplementedTraceServiceServer can be embedded to have forward compatible implementations. 406 type UnimplementedTraceServiceServer struct { 407 } 408 409 func (*UnimplementedTraceServiceServer) StreamTraces(TraceService_StreamTracesServer) error { 410 return status.Errorf(codes.Unimplemented, "method StreamTraces not implemented") 411 } 412 413 func RegisterTraceServiceServer(s *grpc.Server, srv TraceServiceServer) { 414 s.RegisterService(&_TraceService_serviceDesc, srv) 415 } 416 417 func _TraceService_StreamTraces_Handler(srv interface{}, stream grpc.ServerStream) error { 418 return srv.(TraceServiceServer).StreamTraces(&traceServiceStreamTracesServer{stream}) 419 } 420 421 type TraceService_StreamTracesServer interface { 422 SendAndClose(*StreamTracesResponse) error 423 Recv() (*StreamTracesMessage, error) 424 grpc.ServerStream 425 } 426 427 type traceServiceStreamTracesServer struct { 428 grpc.ServerStream 429 } 430 431 func (x *traceServiceStreamTracesServer) SendAndClose(m *StreamTracesResponse) error { 432 return x.ServerStream.SendMsg(m) 433 } 434 435 func (x *traceServiceStreamTracesServer) Recv() (*StreamTracesMessage, error) { 436 m := new(StreamTracesMessage) 437 if err := x.ServerStream.RecvMsg(m); err != nil { 438 return nil, err 439 } 440 return m, nil 441 } 442 443 var _TraceService_serviceDesc = grpc.ServiceDesc{ 444 ServiceName: "envoy.service.trace.v3.TraceService", 445 HandlerType: (*TraceServiceServer)(nil), 446 Methods: []grpc.MethodDesc{}, 447 Streams: []grpc.StreamDesc{ 448 { 449 StreamName: "StreamTraces", 450 Handler: _TraceService_StreamTraces_Handler, 451 ClientStreams: true, 452 }, 453 }, 454 Metadata: "envoy/service/trace/v3/trace_service.proto", 455 }