diff --git a/.github/workflows/ci-lint-test.yml b/.github/workflows/ci-lint-test.yml new file mode 100644 index 0000000..fe6f08e --- /dev/null +++ b/.github/workflows/ci-lint-test.yml @@ -0,0 +1,35 @@ +name: Lint Checks + +on: + push: + branches: [main] + + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }} + cancel-in-progress: true + +# See https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions +permissions: # added using https://github.com/step-security/secure-workflows + contents: read + +jobs: + generated-files-check: + runs-on: ubuntu-latest + steps: + - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + with: + egress-policy: audit # TODO: change to 'egress-policy: block' after a couple of runs + + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + with: + submodules: recursive + + - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 + with: + go-version: 1.23.x + + - name: Verify Protobuf types are up to date + run: make new-proto && git diff --name-status --exit-code \ No newline at end of file diff --git a/Makefile b/Makefile index da1d14a..92d4a63 100644 --- a/Makefile +++ b/Makefile @@ -108,6 +108,21 @@ PROTOC_INTERNAL := $(PROTOC) \ --csharp_out=internal_access,base_namespace:${PROTO_GEN_CSHARP_DIR} \ --python_out=${PROTO_GEN_PYTHON_DIR} +GO=go +GOOS ?= $(shell $(GO) env GOOS) +GOARCH ?= $(shell $(GO) env GOARCH) + +# sed on Mac does not support the same syntax for in-place updates as sed on Linux +# When running on MacOS it's best to install gsed and run Makefile with SED=gsed +ifeq ($(GOOS),darwin) + SED=gsed +else + SED=sed +endif + +# import other Makefiles after the variables are defined +include Makefile.Protobuf.mk + .PHONY: proto proto: proto-prepare proto-api-v2 proto-api-v3 diff --git a/Makefile.Protobuf.mk b/Makefile.Protobuf.mk new file mode 100644 index 0000000..588b14a --- /dev/null +++ b/Makefile.Protobuf.mk @@ -0,0 +1,70 @@ +# Copyright (c) 2023 The Jaeger Authors. +# SPDX-License-Identifier: Apache-2.0 + +# Generate gogo, swagger, go-validators, gRPC-storage-plugin output. +# +# -I declares import folders, in order of importance. This is how proto resolves the protofile imports. +# It will check for the protofile relative to each of thesefolders and use the first one it finds. +# +# --gogo_out generates GoGo Protobuf output with gRPC plugin enabled. +# --govalidators_out generates Go validation files for our messages types, if specified. +# +# The lines starting with Mgoogle/... are proto import replacements, +# which cause the generated file to import the specified packages +# instead of the go_package's declared by the imported protof files. +# + +DOCKER_PROTOBUF_VERSION=0.5.0 +DOCKER_PROTOBUF=jaegertracing/protobuf:$(DOCKER_PROTOBUF_VERSION) +# PROTOC := ${DOCKER} run --rm -u ${shell id -u} -v${PWD}:${PWD} -w${PWD} ${DOCKER_PROTOBUF} --proto_path=${PWD} + +PATCHED_OTEL_PROTO_DIR = proto-gen/.patched-otel-proto + +# The source directory for OTLP Protobufs from the sub-sub-module. +OTEL_PROTO_SRC_DIR=opentelemetry-proto/opentelemetry/proto + +# Find all OTEL .proto files, remove leading path (only keep relevant namespace dirs). +OTEL_PROTO_FILES=$(subst $(OTEL_PROTO_SRC_DIR)/,,\ + $(shell ls $(OTEL_PROTO_SRC_DIR)/{common,resource,trace}/v1/*.proto)) + +# Macro to execute a command passed as argument. +# DO NOT DELETE EMPTY LINE at the end of the macro, it's required to separate commands. +define exec-command +$(1) + +endef + +# DO NOT DELETE EMPTY LINE at the end of the macro, it's required to separate commands. +define print_caption + @echo "🏗️ " + @echo "🏗️ " $1 + @echo "🏗️ " + +endef + +# Macro to compile Protobuf $(2) into directory $(1). $(3) can provide additional flags. +# DO NOT DELETE EMPTY LINE at the end of the macro, it's required to separate commands. +# Arguments: +# $(1) - output directory +# $(2) - path to the .proto file +# $(3) - additional flags to pass to protoc, e.g. extra -Ixxx +# $(4) - additional options to pass to gogo plugin +define proto_compile + $(call print_caption, "Processing $(2) --> $(1)") + + $(PROTOC) \ + $(PROTO_INCLUDES) \ + --gogo_out=plugins=grpc,$(strip $(4)),$(PROTO_GOGO_MAPPINGS):$(PWD)/$(strip $(1)) \ + $(3) $(2) + +endef + +.PHONY: new-proto +new-proto: new-proto-api-v2 + +.PHONY: new-proto-api-v2 +new-proto-api-v2: + mkdir -p proto-gen/api_v2 + $(call proto_compile, proto-gen/api_v2, proto/api_v2/query.proto) + $(call proto_compile, proto-gen/api_v2, proto/api_v2/collector.proto) + $(call proto_compile, proto-gen/api_v2, proto/api_v2/sampling.proto) diff --git a/proto-gen/api_v2/collector.pb.go b/proto-gen/api_v2/collector.pb.go new file mode 100644 index 0000000..b15329c --- /dev/null +++ b/proto-gen/api_v2/collector.pb.go @@ -0,0 +1,551 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: collector.proto + +package api_v2 + +import ( + context "context" + fmt "fmt" + _ "github.com/gogo/googleapis/google/api" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + model "github.com/jaegertracing/jaeger/model" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type PostSpansRequest struct { + Batch model.Batch `protobuf:"bytes,1,opt,name=batch,proto3" json:"batch"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PostSpansRequest) Reset() { *m = PostSpansRequest{} } +func (m *PostSpansRequest) String() string { return proto.CompactTextString(m) } +func (*PostSpansRequest) ProtoMessage() {} +func (*PostSpansRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9305884a292fdf82, []int{0} +} +func (m *PostSpansRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PostSpansRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PostSpansRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PostSpansRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PostSpansRequest.Merge(m, src) +} +func (m *PostSpansRequest) XXX_Size() int { + return m.Size() +} +func (m *PostSpansRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PostSpansRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_PostSpansRequest proto.InternalMessageInfo + +func (m *PostSpansRequest) GetBatch() model.Batch { + if m != nil { + return m.Batch + } + return model.Batch{} +} + +type PostSpansResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PostSpansResponse) Reset() { *m = PostSpansResponse{} } +func (m *PostSpansResponse) String() string { return proto.CompactTextString(m) } +func (*PostSpansResponse) ProtoMessage() {} +func (*PostSpansResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9305884a292fdf82, []int{1} +} +func (m *PostSpansResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PostSpansResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PostSpansResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PostSpansResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_PostSpansResponse.Merge(m, src) +} +func (m *PostSpansResponse) XXX_Size() int { + return m.Size() +} +func (m *PostSpansResponse) XXX_DiscardUnknown() { + xxx_messageInfo_PostSpansResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_PostSpansResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*PostSpansRequest)(nil), "jaeger.api_v2.PostSpansRequest") + proto.RegisterType((*PostSpansResponse)(nil), "jaeger.api_v2.PostSpansResponse") +} + +func init() { proto.RegisterFile("collector.proto", fileDescriptor_9305884a292fdf82) } + +var fileDescriptor_9305884a292fdf82 = []byte{ + // 262 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4f, 0xce, 0xcf, 0xc9, + 0x49, 0x4d, 0x2e, 0xc9, 0x2f, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xcd, 0x4a, 0x4c, + 0x4d, 0x4f, 0x2d, 0xd2, 0x4b, 0x2c, 0xc8, 0x8c, 0x2f, 0x33, 0x92, 0xe2, 0xce, 0xcd, 0x4f, 0x49, + 0xcd, 0x81, 0xc8, 0x49, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x99, 0xfa, 0x20, 0x16, 0x54, 0x54, + 0x26, 0x3d, 0x3f, 0x3f, 0x3d, 0x27, 0x55, 0x3f, 0xb1, 0x20, 0x53, 0x3f, 0x31, 0x2f, 0x2f, 0xbf, + 0x24, 0xb1, 0x24, 0x33, 0x3f, 0xaf, 0x18, 0x22, 0xab, 0xe4, 0xc2, 0x25, 0x10, 0x90, 0x5f, 0x5c, + 0x12, 0x5c, 0x90, 0x98, 0x57, 0x1c, 0x94, 0x5a, 0x58, 0x9a, 0x5a, 0x5c, 0x22, 0x64, 0xc0, 0xc5, + 0x9a, 0x94, 0x58, 0x92, 0x9c, 0x21, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xa2, 0x87, 0x62, + 0xa7, 0x9e, 0x13, 0x48, 0xce, 0x89, 0xe5, 0xc4, 0x3d, 0x79, 0x86, 0x20, 0x88, 0x42, 0x25, 0x61, + 0x2e, 0x41, 0x24, 0x53, 0x8a, 0x0b, 0xf2, 0xf3, 0x8a, 0x53, 0x8d, 0x6a, 0xb8, 0x04, 0x9c, 0x61, + 0xae, 0x0f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0x15, 0xca, 0xe0, 0xe2, 0x84, 0x2b, 0x14, 0x92, + 0x47, 0x33, 0x18, 0xdd, 0x21, 0x52, 0x0a, 0xb8, 0x15, 0x40, 0xec, 0x50, 0x92, 0x68, 0xba, 0xfc, + 0x64, 0x32, 0x93, 0x90, 0x12, 0x2f, 0xd8, 0x7b, 0x65, 0x46, 0xfa, 0xc5, 0x20, 0x69, 0x2b, 0x46, + 0x2d, 0x27, 0xdd, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x91, + 0x4b, 0x3c, 0x33, 0x1f, 0x6a, 0x56, 0x49, 0x51, 0x62, 0x72, 0x66, 0x5e, 0x3a, 0xd4, 0xc8, 0x28, + 0x36, 0x08, 0x9d, 0xc4, 0x06, 0x0e, 0x0e, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6f, 0x18, + 0xa1, 0x12, 0x71, 0x01, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// CollectorServiceClient is the client API for CollectorService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type CollectorServiceClient interface { + PostSpans(ctx context.Context, in *PostSpansRequest, opts ...grpc.CallOption) (*PostSpansResponse, error) +} + +type collectorServiceClient struct { + cc *grpc.ClientConn +} + +func NewCollectorServiceClient(cc *grpc.ClientConn) CollectorServiceClient { + return &collectorServiceClient{cc} +} + +func (c *collectorServiceClient) PostSpans(ctx context.Context, in *PostSpansRequest, opts ...grpc.CallOption) (*PostSpansResponse, error) { + out := new(PostSpansResponse) + err := c.cc.Invoke(ctx, "/jaeger.api_v2.CollectorService/PostSpans", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CollectorServiceServer is the server API for CollectorService service. +type CollectorServiceServer interface { + PostSpans(context.Context, *PostSpansRequest) (*PostSpansResponse, error) +} + +// UnimplementedCollectorServiceServer can be embedded to have forward compatible implementations. +type UnimplementedCollectorServiceServer struct { +} + +func (*UnimplementedCollectorServiceServer) PostSpans(ctx context.Context, req *PostSpansRequest) (*PostSpansResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PostSpans not implemented") +} + +func RegisterCollectorServiceServer(s *grpc.Server, srv CollectorServiceServer) { + s.RegisterService(&_CollectorService_serviceDesc, srv) +} + +func _CollectorService_PostSpans_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PostSpansRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CollectorServiceServer).PostSpans(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/jaeger.api_v2.CollectorService/PostSpans", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CollectorServiceServer).PostSpans(ctx, req.(*PostSpansRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _CollectorService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "jaeger.api_v2.CollectorService", + HandlerType: (*CollectorServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "PostSpans", + Handler: _CollectorService_PostSpans_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "collector.proto", +} + +func (m *PostSpansRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PostSpansRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PostSpansRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size, err := m.Batch.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCollector(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *PostSpansResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PostSpansResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PostSpansResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + return len(dAtA) - i, nil +} + +func encodeVarintCollector(dAtA []byte, offset int, v uint64) int { + offset -= sovCollector(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *PostSpansRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Batch.Size() + n += 1 + l + sovCollector(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *PostSpansResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCollector(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozCollector(x uint64) (n int) { + return sovCollector(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *PostSpansRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCollector + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PostSpansRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PostSpansRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Batch", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCollector + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCollector + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCollector + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Batch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCollector(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCollector + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PostSpansResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCollector + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PostSpansResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PostSpansResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCollector(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCollector + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCollector(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCollector + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCollector + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCollector + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthCollector + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupCollector + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthCollector + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthCollector = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCollector = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupCollector = fmt.Errorf("proto: unexpected end of group") +) diff --git a/proto-gen/api_v2/query.pb.go b/proto-gen/api_v2/query.pb.go new file mode 100644 index 0000000..311b5c0 --- /dev/null +++ b/proto-gen/api_v2/query.pb.go @@ -0,0 +1,3780 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: query.proto + +package api_v2 + +import ( + context "context" + fmt "fmt" + _ "github.com/gogo/googleapis/google/api" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + _ "github.com/gogo/protobuf/types" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + github_com_jaegertracing_jaeger_model "github.com/jaegertracing/jaeger/model" + model "github.com/jaegertracing/jaeger/model" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type GetTraceRequest struct { + TraceID github_com_jaegertracing_jaeger_model.TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=github.com/jaegertracing/jaeger/model.TraceID" json:"trace_id"` + // Optional. The start time to search trace ID. + StartTime time.Time `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time"` + // Optional. The end time to search trace ID. + EndTime time.Time `protobuf:"bytes,3,opt,name=end_time,json=endTime,proto3,stdtime" json:"end_time"` + // Optional. If set to true, the response will not include any + // enrichments to the trace, such as clock skew adjustment. + // Instead, the trace will be returned exactly as stored. + RawTraces bool `protobuf:"varint,4,opt,name=raw_traces,json=rawTraces,proto3" json:"raw_traces,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetTraceRequest) Reset() { *m = GetTraceRequest{} } +func (m *GetTraceRequest) String() string { return proto.CompactTextString(m) } +func (*GetTraceRequest) ProtoMessage() {} +func (*GetTraceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5c6ac9b241082464, []int{0} +} +func (m *GetTraceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetTraceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetTraceRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetTraceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetTraceRequest.Merge(m, src) +} +func (m *GetTraceRequest) XXX_Size() int { + return m.Size() +} +func (m *GetTraceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetTraceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetTraceRequest proto.InternalMessageInfo + +func (m *GetTraceRequest) GetStartTime() time.Time { + if m != nil { + return m.StartTime + } + return time.Time{} +} + +func (m *GetTraceRequest) GetEndTime() time.Time { + if m != nil { + return m.EndTime + } + return time.Time{} +} + +func (m *GetTraceRequest) GetRawTraces() bool { + if m != nil { + return m.RawTraces + } + return false +} + +type SpansResponseChunk struct { + Spans []model.Span `protobuf:"bytes,1,rep,name=spans,proto3" json:"spans"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SpansResponseChunk) Reset() { *m = SpansResponseChunk{} } +func (m *SpansResponseChunk) String() string { return proto.CompactTextString(m) } +func (*SpansResponseChunk) ProtoMessage() {} +func (*SpansResponseChunk) Descriptor() ([]byte, []int) { + return fileDescriptor_5c6ac9b241082464, []int{1} +} +func (m *SpansResponseChunk) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SpansResponseChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpansResponseChunk.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SpansResponseChunk) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpansResponseChunk.Merge(m, src) +} +func (m *SpansResponseChunk) XXX_Size() int { + return m.Size() +} +func (m *SpansResponseChunk) XXX_DiscardUnknown() { + xxx_messageInfo_SpansResponseChunk.DiscardUnknown(m) +} + +var xxx_messageInfo_SpansResponseChunk proto.InternalMessageInfo + +func (m *SpansResponseChunk) GetSpans() []model.Span { + if m != nil { + return m.Spans + } + return nil +} + +type ArchiveTraceRequest struct { + TraceID github_com_jaegertracing_jaeger_model.TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=github.com/jaegertracing/jaeger/model.TraceID" json:"trace_id"` + // Optional. The start time to search trace ID. + StartTime time.Time `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time"` + // Optional. The end time to search trace ID. + EndTime time.Time `protobuf:"bytes,3,opt,name=end_time,json=endTime,proto3,stdtime" json:"end_time"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ArchiveTraceRequest) Reset() { *m = ArchiveTraceRequest{} } +func (m *ArchiveTraceRequest) String() string { return proto.CompactTextString(m) } +func (*ArchiveTraceRequest) ProtoMessage() {} +func (*ArchiveTraceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5c6ac9b241082464, []int{2} +} +func (m *ArchiveTraceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ArchiveTraceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ArchiveTraceRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ArchiveTraceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ArchiveTraceRequest.Merge(m, src) +} +func (m *ArchiveTraceRequest) XXX_Size() int { + return m.Size() +} +func (m *ArchiveTraceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ArchiveTraceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ArchiveTraceRequest proto.InternalMessageInfo + +func (m *ArchiveTraceRequest) GetStartTime() time.Time { + if m != nil { + return m.StartTime + } + return time.Time{} +} + +func (m *ArchiveTraceRequest) GetEndTime() time.Time { + if m != nil { + return m.EndTime + } + return time.Time{} +} + +type ArchiveTraceResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ArchiveTraceResponse) Reset() { *m = ArchiveTraceResponse{} } +func (m *ArchiveTraceResponse) String() string { return proto.CompactTextString(m) } +func (*ArchiveTraceResponse) ProtoMessage() {} +func (*ArchiveTraceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5c6ac9b241082464, []int{3} +} +func (m *ArchiveTraceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ArchiveTraceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ArchiveTraceResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ArchiveTraceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ArchiveTraceResponse.Merge(m, src) +} +func (m *ArchiveTraceResponse) XXX_Size() int { + return m.Size() +} +func (m *ArchiveTraceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ArchiveTraceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ArchiveTraceResponse proto.InternalMessageInfo + +// Query parameters to find traces. Except for num_traces, all fields should be treated +// as forming a conjunction, e.g., "service_name='X' AND operation_name='Y' AND ...". +// All fields are matched against individual spans, not at the trace level. +// The returned results contain traces where at least one span matches the conditions. +// When num_traces results in fewer traces returned, there is no required ordering. +// +// Note: num_traces should restrict the number of traces returned, but not all backends +// interpret it this way. For instance, in Cassandra this limits the number of _spans_ +// that match the conditions, and the resulting number of traces can be less. +// +// Note: some storage implementations do not guarantee the correct implementation of all parameters. +// +type TraceQueryParameters struct { + ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` + OperationName string `protobuf:"bytes,2,opt,name=operation_name,json=operationName,proto3" json:"operation_name,omitempty"` + Tags map[string]string `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StartTimeMin time.Time `protobuf:"bytes,4,opt,name=start_time_min,json=startTimeMin,proto3,stdtime" json:"start_time_min"` + StartTimeMax time.Time `protobuf:"bytes,5,opt,name=start_time_max,json=startTimeMax,proto3,stdtime" json:"start_time_max"` + DurationMin time.Duration `protobuf:"bytes,6,opt,name=duration_min,json=durationMin,proto3,stdduration" json:"duration_min"` + DurationMax time.Duration `protobuf:"bytes,7,opt,name=duration_max,json=durationMax,proto3,stdduration" json:"duration_max"` + SearchDepth int32 `protobuf:"varint,8,opt,name=search_depth,json=searchDepth,proto3" json:"search_depth,omitempty"` + // Optional. If set to true, the response will not include any + // enrichments to the trace, such as clock skew adjustment. + // Instead, the trace will be returned exactly as stored. + RawTraces bool `protobuf:"varint,9,opt,name=raw_traces,json=rawTraces,proto3" json:"raw_traces,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TraceQueryParameters) Reset() { *m = TraceQueryParameters{} } +func (m *TraceQueryParameters) String() string { return proto.CompactTextString(m) } +func (*TraceQueryParameters) ProtoMessage() {} +func (*TraceQueryParameters) Descriptor() ([]byte, []int) { + return fileDescriptor_5c6ac9b241082464, []int{4} +} +func (m *TraceQueryParameters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TraceQueryParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TraceQueryParameters.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TraceQueryParameters) XXX_Merge(src proto.Message) { + xxx_messageInfo_TraceQueryParameters.Merge(m, src) +} +func (m *TraceQueryParameters) XXX_Size() int { + return m.Size() +} +func (m *TraceQueryParameters) XXX_DiscardUnknown() { + xxx_messageInfo_TraceQueryParameters.DiscardUnknown(m) +} + +var xxx_messageInfo_TraceQueryParameters proto.InternalMessageInfo + +func (m *TraceQueryParameters) GetServiceName() string { + if m != nil { + return m.ServiceName + } + return "" +} + +func (m *TraceQueryParameters) GetOperationName() string { + if m != nil { + return m.OperationName + } + return "" +} + +func (m *TraceQueryParameters) GetTags() map[string]string { + if m != nil { + return m.Tags + } + return nil +} + +func (m *TraceQueryParameters) GetStartTimeMin() time.Time { + if m != nil { + return m.StartTimeMin + } + return time.Time{} +} + +func (m *TraceQueryParameters) GetStartTimeMax() time.Time { + if m != nil { + return m.StartTimeMax + } + return time.Time{} +} + +func (m *TraceQueryParameters) GetDurationMin() time.Duration { + if m != nil { + return m.DurationMin + } + return 0 +} + +func (m *TraceQueryParameters) GetDurationMax() time.Duration { + if m != nil { + return m.DurationMax + } + return 0 +} + +func (m *TraceQueryParameters) GetSearchDepth() int32 { + if m != nil { + return m.SearchDepth + } + return 0 +} + +func (m *TraceQueryParameters) GetRawTraces() bool { + if m != nil { + return m.RawTraces + } + return false +} + +type FindTracesRequest struct { + Query *TraceQueryParameters `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FindTracesRequest) Reset() { *m = FindTracesRequest{} } +func (m *FindTracesRequest) String() string { return proto.CompactTextString(m) } +func (*FindTracesRequest) ProtoMessage() {} +func (*FindTracesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5c6ac9b241082464, []int{5} +} +func (m *FindTracesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FindTracesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FindTracesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *FindTracesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_FindTracesRequest.Merge(m, src) +} +func (m *FindTracesRequest) XXX_Size() int { + return m.Size() +} +func (m *FindTracesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_FindTracesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_FindTracesRequest proto.InternalMessageInfo + +func (m *FindTracesRequest) GetQuery() *TraceQueryParameters { + if m != nil { + return m.Query + } + return nil +} + +type GetServicesRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetServicesRequest) Reset() { *m = GetServicesRequest{} } +func (m *GetServicesRequest) String() string { return proto.CompactTextString(m) } +func (*GetServicesRequest) ProtoMessage() {} +func (*GetServicesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5c6ac9b241082464, []int{6} +} +func (m *GetServicesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetServicesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetServicesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetServicesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetServicesRequest.Merge(m, src) +} +func (m *GetServicesRequest) XXX_Size() int { + return m.Size() +} +func (m *GetServicesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetServicesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetServicesRequest proto.InternalMessageInfo + +type GetServicesResponse struct { + Services []string `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetServicesResponse) Reset() { *m = GetServicesResponse{} } +func (m *GetServicesResponse) String() string { return proto.CompactTextString(m) } +func (*GetServicesResponse) ProtoMessage() {} +func (*GetServicesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5c6ac9b241082464, []int{7} +} +func (m *GetServicesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetServicesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetServicesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetServicesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetServicesResponse.Merge(m, src) +} +func (m *GetServicesResponse) XXX_Size() int { + return m.Size() +} +func (m *GetServicesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetServicesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetServicesResponse proto.InternalMessageInfo + +func (m *GetServicesResponse) GetServices() []string { + if m != nil { + return m.Services + } + return nil +} + +type GetOperationsRequest struct { + Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` + SpanKind string `protobuf:"bytes,2,opt,name=span_kind,json=spanKind,proto3" json:"span_kind,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetOperationsRequest) Reset() { *m = GetOperationsRequest{} } +func (m *GetOperationsRequest) String() string { return proto.CompactTextString(m) } +func (*GetOperationsRequest) ProtoMessage() {} +func (*GetOperationsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5c6ac9b241082464, []int{8} +} +func (m *GetOperationsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetOperationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetOperationsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetOperationsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetOperationsRequest.Merge(m, src) +} +func (m *GetOperationsRequest) XXX_Size() int { + return m.Size() +} +func (m *GetOperationsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetOperationsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetOperationsRequest proto.InternalMessageInfo + +func (m *GetOperationsRequest) GetService() string { + if m != nil { + return m.Service + } + return "" +} + +func (m *GetOperationsRequest) GetSpanKind() string { + if m != nil { + return m.SpanKind + } + return "" +} + +type Operation struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + SpanKind string `protobuf:"bytes,2,opt,name=span_kind,json=spanKind,proto3" json:"span_kind,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Operation) Reset() { *m = Operation{} } +func (m *Operation) String() string { return proto.CompactTextString(m) } +func (*Operation) ProtoMessage() {} +func (*Operation) Descriptor() ([]byte, []int) { + return fileDescriptor_5c6ac9b241082464, []int{9} +} +func (m *Operation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Operation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Operation.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Operation) XXX_Merge(src proto.Message) { + xxx_messageInfo_Operation.Merge(m, src) +} +func (m *Operation) XXX_Size() int { + return m.Size() +} +func (m *Operation) XXX_DiscardUnknown() { + xxx_messageInfo_Operation.DiscardUnknown(m) +} + +var xxx_messageInfo_Operation proto.InternalMessageInfo + +func (m *Operation) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Operation) GetSpanKind() string { + if m != nil { + return m.SpanKind + } + return "" +} + +type GetOperationsResponse struct { + OperationNames []string `protobuf:"bytes,1,rep,name=operationNames,proto3" json:"operationNames,omitempty"` + Operations []*Operation `protobuf:"bytes,2,rep,name=operations,proto3" json:"operations,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetOperationsResponse) Reset() { *m = GetOperationsResponse{} } +func (m *GetOperationsResponse) String() string { return proto.CompactTextString(m) } +func (*GetOperationsResponse) ProtoMessage() {} +func (*GetOperationsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5c6ac9b241082464, []int{10} +} +func (m *GetOperationsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetOperationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetOperationsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetOperationsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetOperationsResponse.Merge(m, src) +} +func (m *GetOperationsResponse) XXX_Size() int { + return m.Size() +} +func (m *GetOperationsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetOperationsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetOperationsResponse proto.InternalMessageInfo + +func (m *GetOperationsResponse) GetOperationNames() []string { + if m != nil { + return m.OperationNames + } + return nil +} + +func (m *GetOperationsResponse) GetOperations() []*Operation { + if m != nil { + return m.Operations + } + return nil +} + +type GetDependenciesRequest struct { + StartTime time.Time `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time"` + EndTime time.Time `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3,stdtime" json:"end_time"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetDependenciesRequest) Reset() { *m = GetDependenciesRequest{} } +func (m *GetDependenciesRequest) String() string { return proto.CompactTextString(m) } +func (*GetDependenciesRequest) ProtoMessage() {} +func (*GetDependenciesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5c6ac9b241082464, []int{11} +} +func (m *GetDependenciesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetDependenciesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetDependenciesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetDependenciesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetDependenciesRequest.Merge(m, src) +} +func (m *GetDependenciesRequest) XXX_Size() int { + return m.Size() +} +func (m *GetDependenciesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetDependenciesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetDependenciesRequest proto.InternalMessageInfo + +func (m *GetDependenciesRequest) GetStartTime() time.Time { + if m != nil { + return m.StartTime + } + return time.Time{} +} + +func (m *GetDependenciesRequest) GetEndTime() time.Time { + if m != nil { + return m.EndTime + } + return time.Time{} +} + +type GetDependenciesResponse struct { + Dependencies []model.DependencyLink `protobuf:"bytes,1,rep,name=dependencies,proto3" json:"dependencies"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetDependenciesResponse) Reset() { *m = GetDependenciesResponse{} } +func (m *GetDependenciesResponse) String() string { return proto.CompactTextString(m) } +func (*GetDependenciesResponse) ProtoMessage() {} +func (*GetDependenciesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5c6ac9b241082464, []int{12} +} +func (m *GetDependenciesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetDependenciesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetDependenciesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetDependenciesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetDependenciesResponse.Merge(m, src) +} +func (m *GetDependenciesResponse) XXX_Size() int { + return m.Size() +} +func (m *GetDependenciesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetDependenciesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetDependenciesResponse proto.InternalMessageInfo + +func (m *GetDependenciesResponse) GetDependencies() []model.DependencyLink { + if m != nil { + return m.Dependencies + } + return nil +} + +func init() { + proto.RegisterType((*GetTraceRequest)(nil), "jaeger.api_v2.GetTraceRequest") + proto.RegisterType((*SpansResponseChunk)(nil), "jaeger.api_v2.SpansResponseChunk") + proto.RegisterType((*ArchiveTraceRequest)(nil), "jaeger.api_v2.ArchiveTraceRequest") + proto.RegisterType((*ArchiveTraceResponse)(nil), "jaeger.api_v2.ArchiveTraceResponse") + proto.RegisterType((*TraceQueryParameters)(nil), "jaeger.api_v2.TraceQueryParameters") + proto.RegisterMapType((map[string]string)(nil), "jaeger.api_v2.TraceQueryParameters.TagsEntry") + proto.RegisterType((*FindTracesRequest)(nil), "jaeger.api_v2.FindTracesRequest") + proto.RegisterType((*GetServicesRequest)(nil), "jaeger.api_v2.GetServicesRequest") + proto.RegisterType((*GetServicesResponse)(nil), "jaeger.api_v2.GetServicesResponse") + proto.RegisterType((*GetOperationsRequest)(nil), "jaeger.api_v2.GetOperationsRequest") + proto.RegisterType((*Operation)(nil), "jaeger.api_v2.Operation") + proto.RegisterType((*GetOperationsResponse)(nil), "jaeger.api_v2.GetOperationsResponse") + proto.RegisterType((*GetDependenciesRequest)(nil), "jaeger.api_v2.GetDependenciesRequest") + proto.RegisterType((*GetDependenciesResponse)(nil), "jaeger.api_v2.GetDependenciesResponse") +} + +func init() { proto.RegisterFile("query.proto", fileDescriptor_5c6ac9b241082464) } + +var fileDescriptor_5c6ac9b241082464 = []byte{ + // 995 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x56, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0x67, 0x1d, 0x3b, 0xb6, 0xdf, 0xda, 0x2d, 0x1d, 0x3b, 0xed, 0xb2, 0xa5, 0xb6, 0xb3, 0xa1, + 0x95, 0x85, 0x94, 0xdd, 0x62, 0x0e, 0x94, 0x0a, 0x09, 0x9a, 0xa6, 0xb5, 0x0a, 0xb4, 0xc0, 0x36, + 0x27, 0x38, 0x58, 0x13, 0xef, 0xb0, 0x5e, 0x1c, 0xcf, 0xba, 0xbb, 0xe3, 0x24, 0x16, 0xe2, 0xc2, + 0x27, 0x40, 0xea, 0x85, 0x13, 0xdf, 0x80, 0xaf, 0x81, 0x72, 0x44, 0xe2, 0xc6, 0x21, 0xa0, 0x88, + 0x0f, 0xc1, 0x11, 0xcd, 0x9f, 0x75, 0x76, 0xd7, 0x51, 0x08, 0xe1, 0xd8, 0x93, 0x77, 0xde, 0xbc, + 0xf7, 0x7b, 0x7f, 0x7f, 0x6f, 0x0c, 0xfa, 0x8b, 0x19, 0x89, 0xe6, 0xf6, 0x34, 0x0a, 0x59, 0x88, + 0xea, 0xdf, 0x60, 0xe2, 0x93, 0xc8, 0xc6, 0xd3, 0x60, 0xb0, 0xdf, 0x33, 0xf5, 0x49, 0xe8, 0x91, + 0x3d, 0x79, 0x67, 0x36, 0xfd, 0xd0, 0x0f, 0xc5, 0xa7, 0xc3, 0xbf, 0x94, 0xf4, 0x4d, 0x3f, 0x0c, + 0xfd, 0x3d, 0xe2, 0xe0, 0x69, 0xe0, 0x60, 0x4a, 0x43, 0x86, 0x59, 0x10, 0xd2, 0x58, 0xdd, 0xb6, + 0xd5, 0xad, 0x38, 0xed, 0xce, 0xbe, 0x76, 0x58, 0x30, 0x21, 0x31, 0xc3, 0x93, 0xa9, 0x52, 0x68, + 0xe5, 0x15, 0xbc, 0x59, 0x24, 0x10, 0xe4, 0xbd, 0xf5, 0xb2, 0x00, 0x57, 0xfb, 0x84, 0xed, 0x44, + 0x78, 0x48, 0x5c, 0xf2, 0x62, 0x46, 0x62, 0x86, 0xbe, 0x82, 0x0a, 0xe3, 0xe7, 0x41, 0xe0, 0x19, + 0x5a, 0x47, 0xeb, 0xd6, 0xb6, 0x3e, 0x3a, 0x3a, 0x6e, 0xbf, 0xf6, 0xfb, 0x71, 0x7b, 0xd3, 0x0f, + 0xd8, 0x68, 0xb6, 0x6b, 0x0f, 0xc3, 0x89, 0x23, 0x33, 0xe1, 0x8a, 0x01, 0xf5, 0xd5, 0xc9, 0x91, + 0xf9, 0x08, 0xb4, 0x27, 0xdb, 0x27, 0xc7, 0xed, 0xb2, 0xfa, 0x74, 0xcb, 0x02, 0xf1, 0x89, 0x87, + 0x1e, 0x02, 0xc4, 0x0c, 0x47, 0x6c, 0xc0, 0x23, 0x35, 0x0a, 0x1d, 0xad, 0xab, 0xf7, 0x4c, 0x5b, + 0x46, 0x69, 0x27, 0x51, 0xda, 0x3b, 0x49, 0x1a, 0x5b, 0x15, 0xee, 0xfa, 0x87, 0x3f, 0xda, 0x9a, + 0x5b, 0x15, 0x76, 0xfc, 0x06, 0x7d, 0x08, 0x15, 0x42, 0x3d, 0x09, 0xb1, 0xf2, 0x1f, 0x20, 0xca, + 0x84, 0x7a, 0x02, 0xe0, 0x16, 0x40, 0x84, 0x0f, 0x06, 0x22, 0xa8, 0xd8, 0x28, 0x76, 0xb4, 0x6e, + 0xc5, 0xad, 0x46, 0xf8, 0x40, 0x84, 0x1b, 0x5b, 0x8f, 0x00, 0x3d, 0x9f, 0x62, 0x1a, 0xbb, 0x24, + 0x9e, 0x86, 0x34, 0x26, 0x0f, 0x47, 0x33, 0x3a, 0x46, 0x0e, 0x94, 0x62, 0x2e, 0x35, 0xb4, 0xce, + 0x4a, 0x57, 0xef, 0x35, 0xec, 0x4c, 0x33, 0x6d, 0x6e, 0xb1, 0x55, 0xe4, 0xbe, 0x5c, 0xa9, 0x67, + 0xfd, 0xad, 0x41, 0xe3, 0x41, 0x34, 0x1c, 0x05, 0xfb, 0xe4, 0x15, 0x2b, 0xb0, 0x75, 0x1d, 0x9a, + 0xd9, 0xcc, 0x65, 0x21, 0xad, 0x5f, 0x8a, 0xd0, 0x14, 0x92, 0x2f, 0x38, 0x2b, 0x3e, 0xc7, 0x11, + 0x9e, 0x10, 0x46, 0xa2, 0x18, 0xad, 0x43, 0x2d, 0x26, 0xd1, 0x7e, 0x30, 0x24, 0x03, 0x8a, 0x27, + 0x44, 0xd4, 0xa5, 0xea, 0xea, 0x4a, 0xf6, 0x0c, 0x4f, 0x08, 0xba, 0x0d, 0x57, 0xc2, 0x29, 0x91, + 0xe3, 0x2b, 0x95, 0x0a, 0x42, 0xa9, 0xbe, 0x90, 0x0a, 0xb5, 0x07, 0x50, 0x64, 0xd8, 0x8f, 0x8d, + 0x15, 0xd1, 0xa5, 0xcd, 0x5c, 0x97, 0xce, 0x72, 0x6e, 0xef, 0x60, 0x3f, 0x7e, 0x44, 0x59, 0x34, + 0x77, 0x85, 0x29, 0xfa, 0x18, 0xae, 0x9c, 0xd6, 0x70, 0x30, 0x09, 0xa8, 0x18, 0x91, 0x8b, 0x16, + 0xa1, 0xb6, 0xa8, 0xe3, 0xd3, 0x80, 0xe6, 0xb1, 0xf0, 0xa1, 0x51, 0xba, 0x1c, 0x16, 0x3e, 0x44, + 0x8f, 0xa1, 0x96, 0xf0, 0x57, 0x44, 0xb5, 0x2a, 0x90, 0xde, 0x58, 0x42, 0xda, 0x56, 0x4a, 0x12, + 0xe8, 0x47, 0x0e, 0xa4, 0x27, 0x86, 0x3c, 0xa6, 0x0c, 0x0e, 0x3e, 0x34, 0xca, 0x97, 0xc1, 0xc1, + 0x87, 0xb2, 0x69, 0x38, 0x1a, 0x8e, 0x06, 0x1e, 0x99, 0xb2, 0x91, 0x51, 0xe9, 0x68, 0xdd, 0x12, + 0x6f, 0x1a, 0x97, 0x6d, 0x73, 0x51, 0x8e, 0x69, 0xd5, 0x1c, 0xd3, 0xcc, 0xf7, 0xa0, 0xba, 0x28, + 0x3e, 0x7a, 0x1d, 0x56, 0xc6, 0x64, 0xae, 0x5a, 0xcf, 0x3f, 0x51, 0x13, 0x4a, 0xfb, 0x78, 0x6f, + 0x96, 0x74, 0x5a, 0x1e, 0xee, 0x17, 0xee, 0x69, 0xd6, 0x33, 0xb8, 0xf6, 0x38, 0xa0, 0x9e, 0x84, + 0x49, 0x88, 0xf5, 0x3e, 0x94, 0xc4, 0xb6, 0x15, 0x10, 0x7a, 0x6f, 0xe3, 0x02, 0xbd, 0x77, 0xa5, + 0x85, 0xd5, 0x04, 0xd4, 0x27, 0xec, 0xb9, 0x1c, 0xb7, 0x04, 0xd0, 0x7a, 0x07, 0x1a, 0x19, 0xa9, + 0x9c, 0x62, 0x64, 0x42, 0x45, 0x0d, 0xa6, 0x5c, 0x06, 0x55, 0x77, 0x71, 0xb6, 0x9e, 0x42, 0xb3, + 0x4f, 0xd8, 0x67, 0xc9, 0x48, 0x2e, 0x62, 0x33, 0xa0, 0xac, 0x74, 0x54, 0x82, 0xc9, 0x11, 0xdd, + 0x84, 0x2a, 0xdf, 0x17, 0x83, 0x71, 0x40, 0x3d, 0x95, 0x68, 0x85, 0x0b, 0x3e, 0x09, 0xa8, 0x67, + 0x7d, 0x00, 0xd5, 0x05, 0x16, 0x42, 0x50, 0x4c, 0x91, 0x43, 0x7c, 0x9f, 0x6f, 0x3d, 0x87, 0xb5, + 0x5c, 0x30, 0x2a, 0x83, 0x3b, 0x29, 0x2e, 0x71, 0xd6, 0x24, 0x79, 0xe4, 0xa4, 0xe8, 0x1e, 0xc0, + 0x42, 0x12, 0x1b, 0x05, 0x41, 0x29, 0x23, 0x57, 0xd6, 0x05, 0xbc, 0x9b, 0xd2, 0xb5, 0x7e, 0xd2, + 0xe0, 0x7a, 0x9f, 0xb0, 0x6d, 0x32, 0x25, 0xd4, 0x23, 0x74, 0x18, 0x9c, 0xb6, 0x29, 0xbb, 0xa2, + 0xb4, 0xff, 0xbf, 0xa2, 0x0a, 0x97, 0x59, 0x51, 0xbb, 0x70, 0x63, 0x29, 0x3e, 0x55, 0x9d, 0x3e, + 0xd4, 0xbc, 0x94, 0x5c, 0x2d, 0xfc, 0x5b, 0xb9, 0xbc, 0x17, 0xa6, 0xf3, 0x4f, 0x03, 0x3a, 0x56, + 0xab, 0x3f, 0x63, 0xd8, 0xfb, 0xb9, 0x04, 0x35, 0x31, 0x70, 0x6a, 0x84, 0xd0, 0x18, 0x2a, 0xc9, + 0x73, 0x8b, 0x5a, 0x39, 0xbc, 0xdc, 0x3b, 0x6c, 0xae, 0x9f, 0xf1, 0xc0, 0x64, 0x9f, 0x24, 0xcb, + 0xfc, 0xfe, 0xb7, 0xbf, 0x5e, 0x16, 0x9a, 0x08, 0x39, 0x92, 0x60, 0xce, 0xb7, 0xc9, 0xc3, 0xf2, + 0xdd, 0x5d, 0x0d, 0x31, 0xa8, 0xa5, 0x97, 0x30, 0xb2, 0x72, 0x80, 0x67, 0xbc, 0x4d, 0xe6, 0xc6, + 0xb9, 0x3a, 0x6a, 0x8b, 0xdf, 0x14, 0x6e, 0xd7, 0xac, 0x86, 0x83, 0xe5, 0x75, 0xca, 0x2f, 0xf2, + 0x01, 0x4e, 0x99, 0x89, 0x3a, 0x39, 0xbc, 0x25, 0xd2, 0x5e, 0x24, 0x4d, 0x24, 0xfc, 0xd5, 0xac, + 0xb2, 0x23, 0x57, 0xcb, 0x7d, 0xed, 0xed, 0xbb, 0x1a, 0xf2, 0x41, 0x4f, 0x91, 0x13, 0xad, 0x2f, + 0x97, 0x33, 0x47, 0x67, 0xd3, 0x3a, 0x4f, 0x45, 0xe5, 0x76, 0x4d, 0xf8, 0xd2, 0x51, 0xd5, 0x49, + 0x28, 0x8d, 0x42, 0xa8, 0x67, 0x58, 0x84, 0x36, 0x96, 0x71, 0x96, 0x08, 0x6f, 0xbe, 0x75, 0xbe, + 0x92, 0x72, 0xd7, 0x10, 0xee, 0xea, 0x48, 0x77, 0x4e, 0xb9, 0x83, 0x0e, 0xc4, 0x9f, 0xb2, 0xf4, + 0x68, 0xa2, 0xdb, 0xcb, 0x68, 0x67, 0x50, 0xcb, 0xbc, 0xf3, 0x6f, 0x6a, 0xca, 0xed, 0x9a, 0x70, + 0x7b, 0x15, 0xd5, 0x9d, 0xf4, 0xbc, 0x6e, 0x6d, 0x1e, 0x9d, 0xb4, 0xb4, 0x5f, 0x4f, 0x5a, 0xda, + 0x9f, 0x27, 0x2d, 0x0d, 0x6e, 0x04, 0xa1, 0x9d, 0xf9, 0x17, 0xa2, 0x50, 0xbf, 0x5c, 0x95, 0xbf, + 0xbb, 0xab, 0x82, 0x69, 0xef, 0xfe, 0x13, 0x00, 0x00, 0xff, 0xff, 0x43, 0x45, 0x1e, 0x73, 0xe4, + 0x0a, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryServiceClient is the client API for QueryService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryServiceClient interface { + GetTrace(ctx context.Context, in *GetTraceRequest, opts ...grpc.CallOption) (QueryService_GetTraceClient, error) + ArchiveTrace(ctx context.Context, in *ArchiveTraceRequest, opts ...grpc.CallOption) (*ArchiveTraceResponse, error) + FindTraces(ctx context.Context, in *FindTracesRequest, opts ...grpc.CallOption) (QueryService_FindTracesClient, error) + GetServices(ctx context.Context, in *GetServicesRequest, opts ...grpc.CallOption) (*GetServicesResponse, error) + GetOperations(ctx context.Context, in *GetOperationsRequest, opts ...grpc.CallOption) (*GetOperationsResponse, error) + GetDependencies(ctx context.Context, in *GetDependenciesRequest, opts ...grpc.CallOption) (*GetDependenciesResponse, error) +} + +type queryServiceClient struct { + cc *grpc.ClientConn +} + +func NewQueryServiceClient(cc *grpc.ClientConn) QueryServiceClient { + return &queryServiceClient{cc} +} + +func (c *queryServiceClient) GetTrace(ctx context.Context, in *GetTraceRequest, opts ...grpc.CallOption) (QueryService_GetTraceClient, error) { + stream, err := c.cc.NewStream(ctx, &_QueryService_serviceDesc.Streams[0], "/jaeger.api_v2.QueryService/GetTrace", opts...) + if err != nil { + return nil, err + } + x := &queryServiceGetTraceClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type QueryService_GetTraceClient interface { + Recv() (*SpansResponseChunk, error) + grpc.ClientStream +} + +type queryServiceGetTraceClient struct { + grpc.ClientStream +} + +func (x *queryServiceGetTraceClient) Recv() (*SpansResponseChunk, error) { + m := new(SpansResponseChunk) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *queryServiceClient) ArchiveTrace(ctx context.Context, in *ArchiveTraceRequest, opts ...grpc.CallOption) (*ArchiveTraceResponse, error) { + out := new(ArchiveTraceResponse) + err := c.cc.Invoke(ctx, "/jaeger.api_v2.QueryService/ArchiveTrace", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryServiceClient) FindTraces(ctx context.Context, in *FindTracesRequest, opts ...grpc.CallOption) (QueryService_FindTracesClient, error) { + stream, err := c.cc.NewStream(ctx, &_QueryService_serviceDesc.Streams[1], "/jaeger.api_v2.QueryService/FindTraces", opts...) + if err != nil { + return nil, err + } + x := &queryServiceFindTracesClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type QueryService_FindTracesClient interface { + Recv() (*SpansResponseChunk, error) + grpc.ClientStream +} + +type queryServiceFindTracesClient struct { + grpc.ClientStream +} + +func (x *queryServiceFindTracesClient) Recv() (*SpansResponseChunk, error) { + m := new(SpansResponseChunk) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *queryServiceClient) GetServices(ctx context.Context, in *GetServicesRequest, opts ...grpc.CallOption) (*GetServicesResponse, error) { + out := new(GetServicesResponse) + err := c.cc.Invoke(ctx, "/jaeger.api_v2.QueryService/GetServices", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryServiceClient) GetOperations(ctx context.Context, in *GetOperationsRequest, opts ...grpc.CallOption) (*GetOperationsResponse, error) { + out := new(GetOperationsResponse) + err := c.cc.Invoke(ctx, "/jaeger.api_v2.QueryService/GetOperations", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryServiceClient) GetDependencies(ctx context.Context, in *GetDependenciesRequest, opts ...grpc.CallOption) (*GetDependenciesResponse, error) { + out := new(GetDependenciesResponse) + err := c.cc.Invoke(ctx, "/jaeger.api_v2.QueryService/GetDependencies", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServiceServer is the server API for QueryService service. +type QueryServiceServer interface { + GetTrace(*GetTraceRequest, QueryService_GetTraceServer) error + ArchiveTrace(context.Context, *ArchiveTraceRequest) (*ArchiveTraceResponse, error) + FindTraces(*FindTracesRequest, QueryService_FindTracesServer) error + GetServices(context.Context, *GetServicesRequest) (*GetServicesResponse, error) + GetOperations(context.Context, *GetOperationsRequest) (*GetOperationsResponse, error) + GetDependencies(context.Context, *GetDependenciesRequest) (*GetDependenciesResponse, error) +} + +// UnimplementedQueryServiceServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServiceServer struct { +} + +func (*UnimplementedQueryServiceServer) GetTrace(req *GetTraceRequest, srv QueryService_GetTraceServer) error { + return status.Errorf(codes.Unimplemented, "method GetTrace not implemented") +} +func (*UnimplementedQueryServiceServer) ArchiveTrace(ctx context.Context, req *ArchiveTraceRequest) (*ArchiveTraceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ArchiveTrace not implemented") +} +func (*UnimplementedQueryServiceServer) FindTraces(req *FindTracesRequest, srv QueryService_FindTracesServer) error { + return status.Errorf(codes.Unimplemented, "method FindTraces not implemented") +} +func (*UnimplementedQueryServiceServer) GetServices(ctx context.Context, req *GetServicesRequest) (*GetServicesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetServices not implemented") +} +func (*UnimplementedQueryServiceServer) GetOperations(ctx context.Context, req *GetOperationsRequest) (*GetOperationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetOperations not implemented") +} +func (*UnimplementedQueryServiceServer) GetDependencies(ctx context.Context, req *GetDependenciesRequest) (*GetDependenciesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDependencies not implemented") +} + +func RegisterQueryServiceServer(s *grpc.Server, srv QueryServiceServer) { + s.RegisterService(&_QueryService_serviceDesc, srv) +} + +func _QueryService_GetTrace_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(GetTraceRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(QueryServiceServer).GetTrace(m, &queryServiceGetTraceServer{stream}) +} + +type QueryService_GetTraceServer interface { + Send(*SpansResponseChunk) error + grpc.ServerStream +} + +type queryServiceGetTraceServer struct { + grpc.ServerStream +} + +func (x *queryServiceGetTraceServer) Send(m *SpansResponseChunk) error { + return x.ServerStream.SendMsg(m) +} + +func _QueryService_ArchiveTrace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ArchiveTraceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).ArchiveTrace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/jaeger.api_v2.QueryService/ArchiveTrace", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).ArchiveTrace(ctx, req.(*ArchiveTraceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QueryService_FindTraces_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(FindTracesRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(QueryServiceServer).FindTraces(m, &queryServiceFindTracesServer{stream}) +} + +type QueryService_FindTracesServer interface { + Send(*SpansResponseChunk) error + grpc.ServerStream +} + +type queryServiceFindTracesServer struct { + grpc.ServerStream +} + +func (x *queryServiceFindTracesServer) Send(m *SpansResponseChunk) error { + return x.ServerStream.SendMsg(m) +} + +func _QueryService_GetServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetServicesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).GetServices(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/jaeger.api_v2.QueryService/GetServices", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).GetServices(ctx, req.(*GetServicesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QueryService_GetOperations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetOperationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).GetOperations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/jaeger.api_v2.QueryService/GetOperations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).GetOperations(ctx, req.(*GetOperationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QueryService_GetDependencies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDependenciesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).GetDependencies(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/jaeger.api_v2.QueryService/GetDependencies", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).GetDependencies(ctx, req.(*GetDependenciesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _QueryService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "jaeger.api_v2.QueryService", + HandlerType: (*QueryServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ArchiveTrace", + Handler: _QueryService_ArchiveTrace_Handler, + }, + { + MethodName: "GetServices", + Handler: _QueryService_GetServices_Handler, + }, + { + MethodName: "GetOperations", + Handler: _QueryService_GetOperations_Handler, + }, + { + MethodName: "GetDependencies", + Handler: _QueryService_GetDependencies_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "GetTrace", + Handler: _QueryService_GetTrace_Handler, + ServerStreams: true, + }, + { + StreamName: "FindTraces", + Handler: _QueryService_FindTraces_Handler, + ServerStreams: true, + }, + }, + Metadata: "query.proto", +} + +func (m *GetTraceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetTraceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetTraceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.RawTraces { + i-- + if m.RawTraces { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.EndTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTime):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintQuery(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x1a + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintQuery(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x12 + { + size := m.TraceID.Size() + i -= size + if _, err := m.TraceID.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *SpansResponseChunk) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpansResponseChunk) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpansResponseChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Spans) > 0 { + for iNdEx := len(m.Spans) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Spans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ArchiveTraceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ArchiveTraceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ArchiveTraceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.EndTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTime):]) + if err3 != nil { + return 0, err3 + } + i -= n3 + i = encodeVarintQuery(dAtA, i, uint64(n3)) + i-- + dAtA[i] = 0x1a + n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime):]) + if err4 != nil { + return 0, err4 + } + i -= n4 + i = encodeVarintQuery(dAtA, i, uint64(n4)) + i-- + dAtA[i] = 0x12 + { + size := m.TraceID.Size() + i -= size + if _, err := m.TraceID.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ArchiveTraceResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ArchiveTraceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ArchiveTraceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + return len(dAtA) - i, nil +} + +func (m *TraceQueryParameters) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TraceQueryParameters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceQueryParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.RawTraces { + i-- + if m.RawTraces { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + if m.SearchDepth != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.SearchDepth)) + i-- + dAtA[i] = 0x40 + } + n5, err5 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.DurationMax, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.DurationMax):]) + if err5 != nil { + return 0, err5 + } + i -= n5 + i = encodeVarintQuery(dAtA, i, uint64(n5)) + i-- + dAtA[i] = 0x3a + n6, err6 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.DurationMin, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.DurationMin):]) + if err6 != nil { + return 0, err6 + } + i -= n6 + i = encodeVarintQuery(dAtA, i, uint64(n6)) + i-- + dAtA[i] = 0x32 + n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTimeMax, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTimeMax):]) + if err7 != nil { + return 0, err7 + } + i -= n7 + i = encodeVarintQuery(dAtA, i, uint64(n7)) + i-- + dAtA[i] = 0x2a + n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTimeMin, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTimeMin):]) + if err8 != nil { + return 0, err8 + } + i -= n8 + i = encodeVarintQuery(dAtA, i, uint64(n8)) + i-- + dAtA[i] = 0x22 + if len(m.Tags) > 0 { + for k := range m.Tags { + v := m.Tags[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintQuery(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintQuery(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintQuery(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x1a + } + } + if len(m.OperationName) > 0 { + i -= len(m.OperationName) + copy(dAtA[i:], m.OperationName) + i = encodeVarintQuery(dAtA, i, uint64(len(m.OperationName))) + i-- + dAtA[i] = 0x12 + } + if len(m.ServiceName) > 0 { + i -= len(m.ServiceName) + copy(dAtA[i:], m.ServiceName) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ServiceName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *FindTracesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FindTracesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FindTracesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Query != nil { + { + size, err := m.Query.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetServicesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetServicesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetServicesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + return len(dAtA) - i, nil +} + +func (m *GetServicesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetServicesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetServicesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Services) > 0 { + for iNdEx := len(m.Services) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Services[iNdEx]) + copy(dAtA[i:], m.Services[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Services[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GetOperationsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetOperationsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetOperationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.SpanKind) > 0 { + i -= len(m.SpanKind) + copy(dAtA[i:], m.SpanKind) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SpanKind))) + i-- + dAtA[i] = 0x12 + } + if len(m.Service) > 0 { + i -= len(m.Service) + copy(dAtA[i:], m.Service) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Service))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Operation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Operation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Operation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.SpanKind) > 0 { + i -= len(m.SpanKind) + copy(dAtA[i:], m.SpanKind) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SpanKind))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetOperationsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetOperationsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetOperationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Operations) > 0 { + for iNdEx := len(m.Operations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Operations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.OperationNames) > 0 { + for iNdEx := len(m.OperationNames) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.OperationNames[iNdEx]) + copy(dAtA[i:], m.OperationNames[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.OperationNames[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GetDependenciesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetDependenciesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetDependenciesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.EndTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTime):]) + if err10 != nil { + return 0, err10 + } + i -= n10 + i = encodeVarintQuery(dAtA, i, uint64(n10)) + i-- + dAtA[i] = 0x12 + n11, err11 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime):]) + if err11 != nil { + return 0, err11 + } + i -= n11 + i = encodeVarintQuery(dAtA, i, uint64(n11)) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *GetDependenciesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetDependenciesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetDependenciesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Dependencies) > 0 { + for iNdEx := len(m.Dependencies) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Dependencies[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GetTraceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.TraceID.Size() + n += 1 + l + sovQuery(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime) + n += 1 + l + sovQuery(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTime) + n += 1 + l + sovQuery(uint64(l)) + if m.RawTraces { + n += 2 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SpansResponseChunk) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Spans) > 0 { + for _, e := range m.Spans { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ArchiveTraceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.TraceID.Size() + n += 1 + l + sovQuery(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime) + n += 1 + l + sovQuery(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTime) + n += 1 + l + sovQuery(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ArchiveTraceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *TraceQueryParameters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ServiceName) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.OperationName) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if len(m.Tags) > 0 { + for k, v := range m.Tags { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovQuery(uint64(len(k))) + 1 + len(v) + sovQuery(uint64(len(v))) + n += mapEntrySize + 1 + sovQuery(uint64(mapEntrySize)) + } + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTimeMin) + n += 1 + l + sovQuery(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTimeMax) + n += 1 + l + sovQuery(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.DurationMin) + n += 1 + l + sovQuery(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.DurationMax) + n += 1 + l + sovQuery(uint64(l)) + if m.SearchDepth != 0 { + n += 1 + sovQuery(uint64(m.SearchDepth)) + } + if m.RawTraces { + n += 2 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FindTracesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Query != nil { + l = m.Query.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetServicesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetServicesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Services) > 0 { + for _, s := range m.Services { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetOperationsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Service) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.SpanKind) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Operation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.SpanKind) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetOperationsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.OperationNames) > 0 { + for _, s := range m.OperationNames { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.Operations) > 0 { + for _, e := range m.Operations { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetDependenciesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime) + n += 1 + l + sovQuery(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTime) + n += 1 + l + sovQuery(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetDependenciesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Dependencies) > 0 { + for _, e := range m.Dependencies { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GetTraceRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetTraceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetTraceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TraceID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EndTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.EndTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RawTraces", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.RawTraces = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpansResponseChunk) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpansResponseChunk: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpansResponseChunk: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spans", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Spans = append(m.Spans, model.Span{}) + if err := m.Spans[len(m.Spans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ArchiveTraceRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ArchiveTraceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ArchiveTraceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TraceID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EndTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.EndTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ArchiveTraceResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ArchiveTraceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ArchiveTraceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TraceQueryParameters) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TraceQueryParameters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TraceQueryParameters: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServiceName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServiceName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OperationName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OperationName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Tags == nil { + m.Tags = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthQuery + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthQuery + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthQuery + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthQuery + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Tags[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTimeMin", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTimeMin, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTimeMax", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTimeMax, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DurationMin", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.DurationMin, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DurationMax", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.DurationMax, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SearchDepth", wireType) + } + m.SearchDepth = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SearchDepth |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RawTraces", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.RawTraces = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FindTracesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FindTracesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FindTracesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Query == nil { + m.Query = &TraceQueryParameters{} + } + if err := m.Query.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetServicesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetServicesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetServicesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetServicesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetServicesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetServicesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Services", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Services = append(m.Services, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetOperationsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetOperationsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetOperationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Service = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpanKind", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpanKind = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Operation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Operation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Operation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpanKind", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpanKind = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetOperationsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetOperationsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetOperationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OperationNames", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OperationNames = append(m.OperationNames, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Operations = append(m.Operations, &Operation{}) + if err := m.Operations[len(m.Operations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetDependenciesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetDependenciesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetDependenciesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EndTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.EndTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetDependenciesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetDependenciesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetDependenciesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Dependencies", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Dependencies = append(m.Dependencies, model.DependencyLink{}) + if err := m.Dependencies[len(m.Dependencies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/proto-gen/api_v2/sampling.pb.go b/proto-gen/api_v2/sampling.pb.go new file mode 100644 index 0000000..f2d01ad --- /dev/null +++ b/proto-gen/api_v2/sampling.pb.go @@ -0,0 +1,1685 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sampling.proto + +package api_v2 + +import ( + context "context" + encoding_binary "encoding/binary" + fmt "fmt" + _ "github.com/gogo/googleapis/google/api" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// See description of the SamplingStrategyResponse.strategyType field. +type SamplingStrategyType int32 + +const ( + SamplingStrategyType_PROBABILISTIC SamplingStrategyType = 0 + SamplingStrategyType_RATE_LIMITING SamplingStrategyType = 1 +) + +var SamplingStrategyType_name = map[int32]string{ + 0: "PROBABILISTIC", + 1: "RATE_LIMITING", +} + +var SamplingStrategyType_value = map[string]int32{ + "PROBABILISTIC": 0, + "RATE_LIMITING": 1, +} + +func (x SamplingStrategyType) String() string { + return proto.EnumName(SamplingStrategyType_name, int32(x)) +} + +func (SamplingStrategyType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_79c798842d009798, []int{0} +} + +// ProbabilisticSamplingStrategy samples traces with a fixed probability. +type ProbabilisticSamplingStrategy struct { + // samplingRate is the sampling probability in the range [0.0, 1.0]. + SamplingRate float64 `protobuf:"fixed64,1,opt,name=samplingRate,proto3" json:"samplingRate,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProbabilisticSamplingStrategy) Reset() { *m = ProbabilisticSamplingStrategy{} } +func (m *ProbabilisticSamplingStrategy) String() string { return proto.CompactTextString(m) } +func (*ProbabilisticSamplingStrategy) ProtoMessage() {} +func (*ProbabilisticSamplingStrategy) Descriptor() ([]byte, []int) { + return fileDescriptor_79c798842d009798, []int{0} +} +func (m *ProbabilisticSamplingStrategy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProbabilisticSamplingStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProbabilisticSamplingStrategy.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ProbabilisticSamplingStrategy) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProbabilisticSamplingStrategy.Merge(m, src) +} +func (m *ProbabilisticSamplingStrategy) XXX_Size() int { + return m.Size() +} +func (m *ProbabilisticSamplingStrategy) XXX_DiscardUnknown() { + xxx_messageInfo_ProbabilisticSamplingStrategy.DiscardUnknown(m) +} + +var xxx_messageInfo_ProbabilisticSamplingStrategy proto.InternalMessageInfo + +func (m *ProbabilisticSamplingStrategy) GetSamplingRate() float64 { + if m != nil { + return m.SamplingRate + } + return 0 +} + +// RateLimitingSamplingStrategy samples a fixed number of traces per time interval. +// The typical implementations use the leaky bucket algorithm. +type RateLimitingSamplingStrategy struct { + // TODO this field type should be changed to double, to support rates like 1 per minute. + MaxTracesPerSecond int32 `protobuf:"varint,1,opt,name=maxTracesPerSecond,proto3" json:"maxTracesPerSecond,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RateLimitingSamplingStrategy) Reset() { *m = RateLimitingSamplingStrategy{} } +func (m *RateLimitingSamplingStrategy) String() string { return proto.CompactTextString(m) } +func (*RateLimitingSamplingStrategy) ProtoMessage() {} +func (*RateLimitingSamplingStrategy) Descriptor() ([]byte, []int) { + return fileDescriptor_79c798842d009798, []int{1} +} +func (m *RateLimitingSamplingStrategy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RateLimitingSamplingStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RateLimitingSamplingStrategy.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RateLimitingSamplingStrategy) XXX_Merge(src proto.Message) { + xxx_messageInfo_RateLimitingSamplingStrategy.Merge(m, src) +} +func (m *RateLimitingSamplingStrategy) XXX_Size() int { + return m.Size() +} +func (m *RateLimitingSamplingStrategy) XXX_DiscardUnknown() { + xxx_messageInfo_RateLimitingSamplingStrategy.DiscardUnknown(m) +} + +var xxx_messageInfo_RateLimitingSamplingStrategy proto.InternalMessageInfo + +func (m *RateLimitingSamplingStrategy) GetMaxTracesPerSecond() int32 { + if m != nil { + return m.MaxTracesPerSecond + } + return 0 +} + +// OperationSamplingStrategy is a sampling strategy for a given operation +// (aka endpoint, span name). Only probabilistic sampling is currently supported. +type OperationSamplingStrategy struct { + Operation string `protobuf:"bytes,1,opt,name=operation,proto3" json:"operation,omitempty"` + ProbabilisticSampling *ProbabilisticSamplingStrategy `protobuf:"bytes,2,opt,name=probabilisticSampling,proto3" json:"probabilisticSampling,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OperationSamplingStrategy) Reset() { *m = OperationSamplingStrategy{} } +func (m *OperationSamplingStrategy) String() string { return proto.CompactTextString(m) } +func (*OperationSamplingStrategy) ProtoMessage() {} +func (*OperationSamplingStrategy) Descriptor() ([]byte, []int) { + return fileDescriptor_79c798842d009798, []int{2} +} +func (m *OperationSamplingStrategy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OperationSamplingStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OperationSamplingStrategy.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *OperationSamplingStrategy) XXX_Merge(src proto.Message) { + xxx_messageInfo_OperationSamplingStrategy.Merge(m, src) +} +func (m *OperationSamplingStrategy) XXX_Size() int { + return m.Size() +} +func (m *OperationSamplingStrategy) XXX_DiscardUnknown() { + xxx_messageInfo_OperationSamplingStrategy.DiscardUnknown(m) +} + +var xxx_messageInfo_OperationSamplingStrategy proto.InternalMessageInfo + +func (m *OperationSamplingStrategy) GetOperation() string { + if m != nil { + return m.Operation + } + return "" +} + +func (m *OperationSamplingStrategy) GetProbabilisticSampling() *ProbabilisticSamplingStrategy { + if m != nil { + return m.ProbabilisticSampling + } + return nil +} + +// PerOperationSamplingStrategies is a combination of strategies for different endpoints +// as well as some service-wide defaults. It is particularly useful for services whose +// endpoints receive vastly different traffic, so that any single rate of sampling would +// result in either too much data for some endpoints or almost no data for other endpoints. +type PerOperationSamplingStrategies struct { + // defaultSamplingProbability is the sampling probability for spans that do not match + // any of the perOperationStrategies. + DefaultSamplingProbability float64 `protobuf:"fixed64,1,opt,name=defaultSamplingProbability,proto3" json:"defaultSamplingProbability,omitempty"` + // defaultLowerBoundTracesPerSecond defines a lower-bound rate limit used to ensure that + // there is some minimal amount of traces sampled for an endpoint that might otherwise + // be never sampled via probabilistic strategies. The limit is local to a service instance, + // so if a service is deployed with many (N) instances, the effective minimum rate of sampling + // will be N times higher. This setting applies to ALL operations, whether or not they match + // one of the perOperationStrategies. + DefaultLowerBoundTracesPerSecond float64 `protobuf:"fixed64,2,opt,name=defaultLowerBoundTracesPerSecond,proto3" json:"defaultLowerBoundTracesPerSecond,omitempty"` + // perOperationStrategies describes sampling strategiesf for individual operations within + // a given service. + PerOperationStrategies []*OperationSamplingStrategy `protobuf:"bytes,3,rep,name=perOperationStrategies,proto3" json:"perOperationStrategies,omitempty"` + // defaultUpperBoundTracesPerSecond defines an upper bound rate limit. + // However, almost no Jaeger SDKs support this parameter. + DefaultUpperBoundTracesPerSecond float64 `protobuf:"fixed64,4,opt,name=defaultUpperBoundTracesPerSecond,proto3" json:"defaultUpperBoundTracesPerSecond,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PerOperationSamplingStrategies) Reset() { *m = PerOperationSamplingStrategies{} } +func (m *PerOperationSamplingStrategies) String() string { return proto.CompactTextString(m) } +func (*PerOperationSamplingStrategies) ProtoMessage() {} +func (*PerOperationSamplingStrategies) Descriptor() ([]byte, []int) { + return fileDescriptor_79c798842d009798, []int{3} +} +func (m *PerOperationSamplingStrategies) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PerOperationSamplingStrategies) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PerOperationSamplingStrategies.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PerOperationSamplingStrategies) XXX_Merge(src proto.Message) { + xxx_messageInfo_PerOperationSamplingStrategies.Merge(m, src) +} +func (m *PerOperationSamplingStrategies) XXX_Size() int { + return m.Size() +} +func (m *PerOperationSamplingStrategies) XXX_DiscardUnknown() { + xxx_messageInfo_PerOperationSamplingStrategies.DiscardUnknown(m) +} + +var xxx_messageInfo_PerOperationSamplingStrategies proto.InternalMessageInfo + +func (m *PerOperationSamplingStrategies) GetDefaultSamplingProbability() float64 { + if m != nil { + return m.DefaultSamplingProbability + } + return 0 +} + +func (m *PerOperationSamplingStrategies) GetDefaultLowerBoundTracesPerSecond() float64 { + if m != nil { + return m.DefaultLowerBoundTracesPerSecond + } + return 0 +} + +func (m *PerOperationSamplingStrategies) GetPerOperationStrategies() []*OperationSamplingStrategy { + if m != nil { + return m.PerOperationStrategies + } + return nil +} + +func (m *PerOperationSamplingStrategies) GetDefaultUpperBoundTracesPerSecond() float64 { + if m != nil { + return m.DefaultUpperBoundTracesPerSecond + } + return 0 +} + +// SamplingStrategyResponse contains an overall sampling strategy for a given service. +// This type should be treated as a union where only one of the strategy field is present. +type SamplingStrategyResponse struct { + // Legacy field that was meant to indicate which one of the strategy fields + // below is present. This enum was not extended when per-operation strategy + // was introduced, because extending enum has backwards compatiblity issues. + // The recommended approach for consumers is to ignore this field and instead + // checks the other fields being not null (starting with operationSampling). + // For producers, it is recommended to set this field correctly for probabilistic + // and rate-limiting strategies, but if per-operation strategy is returned, + // the enum can be set to 0 (probabilistic). + StrategyType SamplingStrategyType `protobuf:"varint,1,opt,name=strategyType,proto3,enum=jaeger.api_v2.SamplingStrategyType" json:"strategyType,omitempty"` + ProbabilisticSampling *ProbabilisticSamplingStrategy `protobuf:"bytes,2,opt,name=probabilisticSampling,proto3" json:"probabilisticSampling,omitempty"` + RateLimitingSampling *RateLimitingSamplingStrategy `protobuf:"bytes,3,opt,name=rateLimitingSampling,proto3" json:"rateLimitingSampling,omitempty"` + OperationSampling *PerOperationSamplingStrategies `protobuf:"bytes,4,opt,name=operationSampling,proto3" json:"operationSampling,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SamplingStrategyResponse) Reset() { *m = SamplingStrategyResponse{} } +func (m *SamplingStrategyResponse) String() string { return proto.CompactTextString(m) } +func (*SamplingStrategyResponse) ProtoMessage() {} +func (*SamplingStrategyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_79c798842d009798, []int{4} +} +func (m *SamplingStrategyResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SamplingStrategyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SamplingStrategyResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SamplingStrategyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SamplingStrategyResponse.Merge(m, src) +} +func (m *SamplingStrategyResponse) XXX_Size() int { + return m.Size() +} +func (m *SamplingStrategyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SamplingStrategyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SamplingStrategyResponse proto.InternalMessageInfo + +func (m *SamplingStrategyResponse) GetStrategyType() SamplingStrategyType { + if m != nil { + return m.StrategyType + } + return SamplingStrategyType_PROBABILISTIC +} + +func (m *SamplingStrategyResponse) GetProbabilisticSampling() *ProbabilisticSamplingStrategy { + if m != nil { + return m.ProbabilisticSampling + } + return nil +} + +func (m *SamplingStrategyResponse) GetRateLimitingSampling() *RateLimitingSamplingStrategy { + if m != nil { + return m.RateLimitingSampling + } + return nil +} + +func (m *SamplingStrategyResponse) GetOperationSampling() *PerOperationSamplingStrategies { + if m != nil { + return m.OperationSampling + } + return nil +} + +// SamplingStrategyParameters defines request parameters for remote sampler. +type SamplingStrategyParameters struct { + // serviceName is a required argument. + ServiceName string `protobuf:"bytes,1,opt,name=serviceName,proto3" json:"serviceName,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SamplingStrategyParameters) Reset() { *m = SamplingStrategyParameters{} } +func (m *SamplingStrategyParameters) String() string { return proto.CompactTextString(m) } +func (*SamplingStrategyParameters) ProtoMessage() {} +func (*SamplingStrategyParameters) Descriptor() ([]byte, []int) { + return fileDescriptor_79c798842d009798, []int{5} +} +func (m *SamplingStrategyParameters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SamplingStrategyParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SamplingStrategyParameters.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SamplingStrategyParameters) XXX_Merge(src proto.Message) { + xxx_messageInfo_SamplingStrategyParameters.Merge(m, src) +} +func (m *SamplingStrategyParameters) XXX_Size() int { + return m.Size() +} +func (m *SamplingStrategyParameters) XXX_DiscardUnknown() { + xxx_messageInfo_SamplingStrategyParameters.DiscardUnknown(m) +} + +var xxx_messageInfo_SamplingStrategyParameters proto.InternalMessageInfo + +func (m *SamplingStrategyParameters) GetServiceName() string { + if m != nil { + return m.ServiceName + } + return "" +} + +func init() { + proto.RegisterEnum("jaeger.api_v2.SamplingStrategyType", SamplingStrategyType_name, SamplingStrategyType_value) + proto.RegisterType((*ProbabilisticSamplingStrategy)(nil), "jaeger.api_v2.ProbabilisticSamplingStrategy") + proto.RegisterType((*RateLimitingSamplingStrategy)(nil), "jaeger.api_v2.RateLimitingSamplingStrategy") + proto.RegisterType((*OperationSamplingStrategy)(nil), "jaeger.api_v2.OperationSamplingStrategy") + proto.RegisterType((*PerOperationSamplingStrategies)(nil), "jaeger.api_v2.PerOperationSamplingStrategies") + proto.RegisterType((*SamplingStrategyResponse)(nil), "jaeger.api_v2.SamplingStrategyResponse") + proto.RegisterType((*SamplingStrategyParameters)(nil), "jaeger.api_v2.SamplingStrategyParameters") +} + +func init() { proto.RegisterFile("sampling.proto", fileDescriptor_79c798842d009798) } + +var fileDescriptor_79c798842d009798 = []byte{ + // 569 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0x41, 0x6f, 0x12, 0x41, + 0x14, 0x76, 0x40, 0x9b, 0xf4, 0xd1, 0xd6, 0x76, 0xac, 0xba, 0x12, 0x4a, 0xc8, 0xf6, 0x20, 0x56, + 0x0b, 0xc9, 0x7a, 0x33, 0xa6, 0x49, 0x69, 0x0c, 0x59, 0x43, 0x29, 0x59, 0xf0, 0xa2, 0x07, 0x1c, + 0xe0, 0xb9, 0x19, 0x03, 0x3b, 0x9b, 0x99, 0x29, 0xca, 0xd5, 0xc4, 0xab, 0x17, 0xcf, 0x5e, 0xfc, + 0x35, 0x1e, 0x4d, 0xbc, 0x79, 0x32, 0xc4, 0x1f, 0x62, 0x76, 0x59, 0x5a, 0x58, 0x16, 0xb8, 0x79, + 0xda, 0xcd, 0x7b, 0xdf, 0x7c, 0xdf, 0xf7, 0xde, 0xbc, 0x79, 0xb0, 0xa3, 0xd8, 0xc0, 0xef, 0x73, + 0xcf, 0x2d, 0xf9, 0x52, 0x68, 0x41, 0xb7, 0xdf, 0x33, 0x74, 0x51, 0x96, 0x98, 0xcf, 0xdb, 0x43, + 0x2b, 0xbb, 0xef, 0x0a, 0x57, 0x84, 0x99, 0x72, 0xf0, 0x37, 0x01, 0x65, 0x73, 0xae, 0x10, 0x6e, + 0x1f, 0xcb, 0xcc, 0xe7, 0x65, 0xe6, 0x79, 0x42, 0x33, 0xcd, 0x85, 0xa7, 0x26, 0x59, 0xf3, 0x0c, + 0x0e, 0x1a, 0x52, 0x74, 0x58, 0x87, 0xf7, 0xb9, 0xd2, 0xbc, 0xdb, 0x8c, 0x14, 0x9a, 0x5a, 0x32, + 0x8d, 0xee, 0x88, 0x9a, 0xb0, 0x35, 0x55, 0x75, 0x98, 0x46, 0x83, 0x14, 0x48, 0x91, 0x38, 0x73, + 0x31, 0xb3, 0x0e, 0xb9, 0xe0, 0x5b, 0xe3, 0x03, 0xae, 0x83, 0xb3, 0x71, 0x8e, 0x12, 0xd0, 0x01, + 0xfb, 0xd8, 0x92, 0xac, 0x8b, 0xaa, 0x81, 0xb2, 0x89, 0x5d, 0xe1, 0xf5, 0x42, 0xa6, 0x5b, 0x4e, + 0x42, 0xc6, 0xfc, 0x46, 0xe0, 0xc1, 0x85, 0x8f, 0x32, 0x74, 0xba, 0xc0, 0x96, 0x83, 0x4d, 0x31, + 0x4d, 0x86, 0x24, 0x9b, 0xce, 0x75, 0x80, 0x76, 0xe0, 0xae, 0x9f, 0x54, 0x90, 0x91, 0x2a, 0x90, + 0x62, 0xc6, 0x7a, 0x52, 0x9a, 0xeb, 0x59, 0x69, 0x65, 0xf1, 0x4e, 0x32, 0x95, 0xf9, 0x3b, 0x05, + 0xf9, 0x06, 0xca, 0x65, 0x16, 0x39, 0x2a, 0x7a, 0x02, 0xd9, 0x1e, 0xbe, 0x63, 0x97, 0x7d, 0x3d, + 0x4d, 0x5e, 0x29, 0xe9, 0x51, 0xd4, 0xc4, 0x15, 0x08, 0xfa, 0x12, 0x0a, 0x51, 0xb6, 0x26, 0x3e, + 0xa0, 0xac, 0x88, 0x4b, 0xaf, 0x17, 0x6f, 0x60, 0x2a, 0x64, 0x59, 0x8b, 0xa3, 0x6f, 0xe1, 0x9e, + 0x3f, 0xeb, 0xf6, 0xca, 0xa5, 0x91, 0x2e, 0xa4, 0x8b, 0x19, 0xab, 0x18, 0xeb, 0xc9, 0xd2, 0xd6, + 0x3b, 0x4b, 0x78, 0x66, 0xdc, 0xbe, 0xf2, 0xfd, 0x25, 0x6e, 0x6f, 0xce, 0xb9, 0x5d, 0x8a, 0x33, + 0x3f, 0xa7, 0xc1, 0x58, 0x10, 0x46, 0xe5, 0x0b, 0x4f, 0x21, 0xad, 0xc2, 0x96, 0x8a, 0x62, 0xad, + 0x91, 0x3f, 0x99, 0xc6, 0x1d, 0xeb, 0x30, 0x56, 0x40, 0xfc, 0x78, 0x00, 0x75, 0xe6, 0x0e, 0xfe, + 0x8f, 0x31, 0xa1, 0x6d, 0xd8, 0x97, 0x09, 0xcf, 0xc2, 0x48, 0x87, 0x12, 0x8f, 0x63, 0x12, 0xab, + 0x5e, 0x90, 0x93, 0x48, 0x44, 0xdf, 0xc0, 0x9e, 0x88, 0xdf, 0x55, 0xd8, 0xe7, 0x8c, 0x75, 0x1c, + 0x2f, 0x60, 0xe5, 0xb8, 0x3a, 0x8b, 0x3c, 0xe6, 0x09, 0x64, 0xe3, 0x36, 0x1a, 0x4c, 0xb2, 0x01, + 0x6a, 0x94, 0x8a, 0x16, 0x20, 0xa3, 0x50, 0x0e, 0x79, 0x17, 0xeb, 0x6c, 0x80, 0xd1, 0x33, 0x9c, + 0x0d, 0x1d, 0x3d, 0x87, 0xfd, 0xa4, 0x7b, 0xa0, 0x7b, 0xb0, 0xdd, 0x70, 0x2e, 0x2a, 0xa7, 0x15, + 0xbb, 0x66, 0x37, 0x5b, 0xf6, 0xd9, 0xee, 0x8d, 0x20, 0xe4, 0x9c, 0xb6, 0x5e, 0xb4, 0x6b, 0xf6, + 0xb9, 0xdd, 0xb2, 0xeb, 0xd5, 0x5d, 0x62, 0x7d, 0x27, 0x70, 0x7b, 0x7a, 0xfc, 0x9c, 0x79, 0xcc, + 0x45, 0x49, 0xbf, 0x10, 0xb8, 0x53, 0x45, 0xbd, 0xb0, 0x10, 0x1e, 0xad, 0xb9, 0xfe, 0x6b, 0xdb, + 0xd9, 0x87, 0x6b, 0xa0, 0xd3, 0x41, 0x33, 0x0f, 0x3f, 0xfd, 0xfa, 0xfb, 0x35, 0x75, 0x60, 0x1a, + 0xe1, 0xde, 0x1c, 0x5a, 0x65, 0x15, 0x43, 0x3e, 0x23, 0x47, 0x95, 0xe3, 0x1f, 0xe3, 0x3c, 0xf9, + 0x39, 0xce, 0x93, 0x3f, 0xe3, 0x3c, 0x81, 0xfb, 0x5c, 0x44, 0xec, 0x5a, 0xb2, 0x6e, 0xb0, 0xa5, + 0x27, 0x22, 0xaf, 0x37, 0x26, 0xdf, 0xce, 0x46, 0xb8, 0x72, 0x9f, 0xfe, 0x0b, 0x00, 0x00, 0xff, + 0xff, 0xf1, 0xcc, 0x49, 0x9b, 0xc7, 0x05, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// SamplingManagerClient is the client API for SamplingManager service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type SamplingManagerClient interface { + GetSamplingStrategy(ctx context.Context, in *SamplingStrategyParameters, opts ...grpc.CallOption) (*SamplingStrategyResponse, error) +} + +type samplingManagerClient struct { + cc *grpc.ClientConn +} + +func NewSamplingManagerClient(cc *grpc.ClientConn) SamplingManagerClient { + return &samplingManagerClient{cc} +} + +func (c *samplingManagerClient) GetSamplingStrategy(ctx context.Context, in *SamplingStrategyParameters, opts ...grpc.CallOption) (*SamplingStrategyResponse, error) { + out := new(SamplingStrategyResponse) + err := c.cc.Invoke(ctx, "/jaeger.api_v2.SamplingManager/GetSamplingStrategy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SamplingManagerServer is the server API for SamplingManager service. +type SamplingManagerServer interface { + GetSamplingStrategy(context.Context, *SamplingStrategyParameters) (*SamplingStrategyResponse, error) +} + +// UnimplementedSamplingManagerServer can be embedded to have forward compatible implementations. +type UnimplementedSamplingManagerServer struct { +} + +func (*UnimplementedSamplingManagerServer) GetSamplingStrategy(ctx context.Context, req *SamplingStrategyParameters) (*SamplingStrategyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSamplingStrategy not implemented") +} + +func RegisterSamplingManagerServer(s *grpc.Server, srv SamplingManagerServer) { + s.RegisterService(&_SamplingManager_serviceDesc, srv) +} + +func _SamplingManager_GetSamplingStrategy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SamplingStrategyParameters) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SamplingManagerServer).GetSamplingStrategy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/jaeger.api_v2.SamplingManager/GetSamplingStrategy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SamplingManagerServer).GetSamplingStrategy(ctx, req.(*SamplingStrategyParameters)) + } + return interceptor(ctx, in, info, handler) +} + +var _SamplingManager_serviceDesc = grpc.ServiceDesc{ + ServiceName: "jaeger.api_v2.SamplingManager", + HandlerType: (*SamplingManagerServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetSamplingStrategy", + Handler: _SamplingManager_GetSamplingStrategy_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "sampling.proto", +} + +func (m *ProbabilisticSamplingStrategy) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ProbabilisticSamplingStrategy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProbabilisticSamplingStrategy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.SamplingRate != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.SamplingRate)))) + i-- + dAtA[i] = 0x9 + } + return len(dAtA) - i, nil +} + +func (m *RateLimitingSamplingStrategy) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RateLimitingSamplingStrategy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RateLimitingSamplingStrategy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.MaxTracesPerSecond != 0 { + i = encodeVarintSampling(dAtA, i, uint64(m.MaxTracesPerSecond)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *OperationSamplingStrategy) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OperationSamplingStrategy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OperationSamplingStrategy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.ProbabilisticSampling != nil { + { + size, err := m.ProbabilisticSampling.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSampling(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Operation) > 0 { + i -= len(m.Operation) + copy(dAtA[i:], m.Operation) + i = encodeVarintSampling(dAtA, i, uint64(len(m.Operation))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PerOperationSamplingStrategies) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PerOperationSamplingStrategies) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PerOperationSamplingStrategies) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.DefaultUpperBoundTracesPerSecond != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.DefaultUpperBoundTracesPerSecond)))) + i-- + dAtA[i] = 0x21 + } + if len(m.PerOperationStrategies) > 0 { + for iNdEx := len(m.PerOperationStrategies) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PerOperationStrategies[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSampling(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.DefaultLowerBoundTracesPerSecond != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.DefaultLowerBoundTracesPerSecond)))) + i-- + dAtA[i] = 0x11 + } + if m.DefaultSamplingProbability != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.DefaultSamplingProbability)))) + i-- + dAtA[i] = 0x9 + } + return len(dAtA) - i, nil +} + +func (m *SamplingStrategyResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SamplingStrategyResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SamplingStrategyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.OperationSampling != nil { + { + size, err := m.OperationSampling.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSampling(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.RateLimitingSampling != nil { + { + size, err := m.RateLimitingSampling.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSampling(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.ProbabilisticSampling != nil { + { + size, err := m.ProbabilisticSampling.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSampling(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.StrategyType != 0 { + i = encodeVarintSampling(dAtA, i, uint64(m.StrategyType)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SamplingStrategyParameters) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SamplingStrategyParameters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SamplingStrategyParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.ServiceName) > 0 { + i -= len(m.ServiceName) + copy(dAtA[i:], m.ServiceName) + i = encodeVarintSampling(dAtA, i, uint64(len(m.ServiceName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintSampling(dAtA []byte, offset int, v uint64) int { + offset -= sovSampling(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ProbabilisticSamplingStrategy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SamplingRate != 0 { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RateLimitingSamplingStrategy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MaxTracesPerSecond != 0 { + n += 1 + sovSampling(uint64(m.MaxTracesPerSecond)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OperationSamplingStrategy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Operation) + if l > 0 { + n += 1 + l + sovSampling(uint64(l)) + } + if m.ProbabilisticSampling != nil { + l = m.ProbabilisticSampling.Size() + n += 1 + l + sovSampling(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *PerOperationSamplingStrategies) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.DefaultSamplingProbability != 0 { + n += 9 + } + if m.DefaultLowerBoundTracesPerSecond != 0 { + n += 9 + } + if len(m.PerOperationStrategies) > 0 { + for _, e := range m.PerOperationStrategies { + l = e.Size() + n += 1 + l + sovSampling(uint64(l)) + } + } + if m.DefaultUpperBoundTracesPerSecond != 0 { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SamplingStrategyResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.StrategyType != 0 { + n += 1 + sovSampling(uint64(m.StrategyType)) + } + if m.ProbabilisticSampling != nil { + l = m.ProbabilisticSampling.Size() + n += 1 + l + sovSampling(uint64(l)) + } + if m.RateLimitingSampling != nil { + l = m.RateLimitingSampling.Size() + n += 1 + l + sovSampling(uint64(l)) + } + if m.OperationSampling != nil { + l = m.OperationSampling.Size() + n += 1 + l + sovSampling(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SamplingStrategyParameters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ServiceName) + if l > 0 { + n += 1 + l + sovSampling(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovSampling(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozSampling(x uint64) (n int) { + return sovSampling(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ProbabilisticSamplingStrategy) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSampling + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ProbabilisticSamplingStrategy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProbabilisticSamplingStrategy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field SamplingRate", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.SamplingRate = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipSampling(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSampling + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RateLimitingSamplingStrategy) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSampling + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RateLimitingSamplingStrategy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RateLimitingSamplingStrategy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxTracesPerSecond", wireType) + } + m.MaxTracesPerSecond = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSampling + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxTracesPerSecond |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipSampling(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSampling + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OperationSamplingStrategy) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSampling + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OperationSamplingStrategy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OperationSamplingStrategy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operation", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSampling + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSampling + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSampling + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Operation = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProbabilisticSampling", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSampling + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSampling + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSampling + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ProbabilisticSampling == nil { + m.ProbabilisticSampling = &ProbabilisticSamplingStrategy{} + } + if err := m.ProbabilisticSampling.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSampling(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSampling + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PerOperationSamplingStrategies) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSampling + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PerOperationSamplingStrategies: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PerOperationSamplingStrategies: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultSamplingProbability", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.DefaultSamplingProbability = float64(math.Float64frombits(v)) + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultLowerBoundTracesPerSecond", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.DefaultLowerBoundTracesPerSecond = float64(math.Float64frombits(v)) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PerOperationStrategies", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSampling + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSampling + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSampling + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PerOperationStrategies = append(m.PerOperationStrategies, &OperationSamplingStrategy{}) + if err := m.PerOperationStrategies[len(m.PerOperationStrategies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultUpperBoundTracesPerSecond", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.DefaultUpperBoundTracesPerSecond = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipSampling(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSampling + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SamplingStrategyResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSampling + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SamplingStrategyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SamplingStrategyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StrategyType", wireType) + } + m.StrategyType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSampling + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StrategyType |= SamplingStrategyType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProbabilisticSampling", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSampling + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSampling + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSampling + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ProbabilisticSampling == nil { + m.ProbabilisticSampling = &ProbabilisticSamplingStrategy{} + } + if err := m.ProbabilisticSampling.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RateLimitingSampling", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSampling + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSampling + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSampling + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RateLimitingSampling == nil { + m.RateLimitingSampling = &RateLimitingSamplingStrategy{} + } + if err := m.RateLimitingSampling.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OperationSampling", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSampling + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSampling + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSampling + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OperationSampling == nil { + m.OperationSampling = &PerOperationSamplingStrategies{} + } + if err := m.OperationSampling.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSampling(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSampling + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SamplingStrategyParameters) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSampling + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SamplingStrategyParameters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SamplingStrategyParameters: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServiceName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSampling + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSampling + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSampling + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServiceName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSampling(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSampling + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipSampling(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSampling + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSampling + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSampling + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthSampling + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupSampling + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthSampling + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthSampling = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSampling = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupSampling = fmt.Errorf("proto: unexpected end of group") +)