...

Source file src/github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/trace/v2/trace_service.pb.go

Documentation: github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/trace/v2

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

View as plain text