From 65a499a247e0e7d0f977f1898100e469975746ac Mon Sep 17 00:00:00 2001 From: Annanay Agarwal Date: Wed, 27 Mar 2019 23:39:30 +0530 Subject: [PATCH] New layout for proto definitions and generated files (#1427) * New project layout for proto definitions Signed-off-by: Annanay * Regenerate grpc code from proto definitions Signed-off-by: Annanay * Commit Makefile changes, run make protoc Signed-off-by: Annanay * Fix dependency in gopkg.toml Signed-off-by: Annanay * Corrected rebase Signed-off-by: Annanay * Install the right proto bin versions Signed-off-by: Annanay * Run make fmt Signed-off-by: Annanay * Revert make fmt changes Signed-off-by: Annanay --- Gopkg.lock | 5 +- Gopkg.toml | 2 +- Makefile | 8 +- model/model.pb.go | 894 +++++++++++----- model/proto/api_v2/collector.proto | 66 ++ .../{api_v2.proto => api_v2/sampling.proto} | 21 +- proto-gen/api_v2/collector.pb.go | 573 +++++++++++ proto-gen/api_v2/collector.pb.gw.go | 115 +++ .../api_v2/{api_v2.pb.go => sampling.pb.go} | 971 +++++++++--------- .../{api_v2.pb.gw.go => sampling.pb.gw.go} | 88 +- proto-gen/openapi/api_v2.swagger.json | 2 +- 11 files changed, 1905 insertions(+), 840 deletions(-) create mode 100644 model/proto/api_v2/collector.proto rename model/proto/{api_v2.proto => api_v2/sampling.proto} (88%) create mode 100644 proto-gen/api_v2/collector.pb.go create mode 100644 proto-gen/api_v2/collector.pb.gw.go rename proto-gen/api_v2/{api_v2.pb.go => sampling.pb.go} (59%) rename proto-gen/api_v2/{api_v2.pb.gw.go => sampling.pb.gw.go} (54%) diff --git a/Gopkg.lock b/Gopkg.lock index 7687d36c5da..38397d3abb2 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -278,7 +278,7 @@ revision = "b23578765ee54ff6bceff57f397d833bf4ca6869" [[projects]] - digest = "1:a7ca1a547447a4baef3c16479b5ba2d90967e9615e371a1205b7fc8c8fdcbfe7" + digest = "1:2d91858167615bbc9f642045d8f7e38a16b346fcc2523f9dc75b6da4d8b3397c" name = "github.com/gogo/protobuf" packages = [ "gogoproto", @@ -303,6 +303,7 @@ "protoc-gen-gogo", "protoc-gen-gogo/descriptor", "protoc-gen-gogo/generator", + "protoc-gen-gogo/generator/internal/remap", "protoc-gen-gogo/grpc", "protoc-gen-gogo/plugin", "sortkeys", @@ -311,7 +312,7 @@ "vanity/command", ] pruneopts = "UT" - revision = "fd9a4790f3963525fb889cc00e0a8f828e0b3a29" + revision = "ba06b47c162d49f2af050fb4c75bcbc86a159d5c" [[projects]] digest = "1:1ba1d79f2810270045c328ae5d674321db34e3aae468eb4233883b473c5c0467" diff --git a/Gopkg.toml b/Gopkg.toml index 42f843f2b00..baece65950b 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -113,7 +113,7 @@ required = [ [[constraint]] name = "github.com/gogo/protobuf" - revision = "fd9a4790f3963525fb889cc00e0a8f828e0b3a29" + revision = "ba06b47c162d49f2af050fb4c75bcbc86a159d5c" [prune] go-tests = true diff --git a/Makefile b/Makefile index fe8f99ee49a..6c4f5ed7ee3 100644 --- a/Makefile +++ b/Makefile @@ -380,10 +380,10 @@ proto: $(PROTOC) \ $(PROTO_INCLUDES) \ - --gogo_out=plugins=grpc,$(PROTO_GOGO_MAPPINGS):$(PWD)/proto-gen/api_v2/ \ - --grpc-gateway_out=$(PROTO_GOGO_MAPPINGS):$(PWD)/proto-gen/api_v2/ \ - --swagger_out=$(PWD)/proto-gen/openapi/ \ - model/proto/api_v2.proto + --gogo_out=plugins=grpc,$(PROTO_GOGO_MAPPINGS):$(PWD)/proto-gen/ \ + --grpc-gateway_out=$(PROTO_GOGO_MAPPINGS):$(PWD)/proto-gen/ \ + --swagger_out=allow_merge=true:$(PWD)/proto-gen/openapi/ \ + model/proto/api_v2/*.proto $(PROTOC) \ -I model/proto \ diff --git a/model/model.pb.go b/model/model.pb.go index a2877bd5feb..48005005910 100644 --- a/model/model.pb.go +++ b/model/model.pb.go @@ -1,40 +1,22 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: model.proto -/* - Package model is a generated protocol buffer package. - - It is generated from these files: - model.proto - - It has these top-level messages: - KeyValue - Log - SpanRef - Process - Span - Trace - Batch -*/ package model -import proto "github.com/gogo/protobuf/proto" -import golang_proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/googleapis/google/api" -import _ "github.com/gogo/protobuf/types" -import _ "github.com/gogo/protobuf/types" - -import time "time" - -import bytes "bytes" - -import binary "encoding/binary" -import types "github.com/gogo/protobuf/types" - -import io "io" +import ( + bytes "bytes" + encoding_binary "encoding/binary" + 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" + golang_proto "github.com/golang/protobuf/proto" + io "io" + math "math" + time "time" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -66,6 +48,7 @@ var ValueType_name = map[int32]string{ 3: "FLOAT64", 4: "BINARY", } + var ValueType_value = map[string]int32{ "STRING": 0, "BOOL": 1, @@ -77,7 +60,10 @@ var ValueType_value = map[string]int32{ func (x ValueType) String() string { return proto.EnumName(ValueType_name, int32(x)) } -func (ValueType) EnumDescriptor() ([]byte, []int) { return fileDescriptorModel, []int{0} } + +func (ValueType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_4c16552f9fdb66d8, []int{0} +} type SpanRefType int32 @@ -90,6 +76,7 @@ var SpanRefType_name = map[int32]string{ 0: "CHILD_OF", 1: "FOLLOWS_FROM", } + var SpanRefType_value = map[string]int32{ "CHILD_OF": 0, "FOLLOWS_FROM": 1, @@ -98,22 +85,56 @@ var SpanRefType_value = map[string]int32{ func (x SpanRefType) String() string { return proto.EnumName(SpanRefType_name, int32(x)) } -func (SpanRefType) EnumDescriptor() ([]byte, []int) { return fileDescriptorModel, []int{1} } + +func (SpanRefType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_4c16552f9fdb66d8, []int{1} +} type KeyValue struct { - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - VType ValueType `protobuf:"varint,2,opt,name=v_type,json=vType,proto3,enum=jaeger.api_v2.ValueType" json:"v_type,omitempty"` - VStr string `protobuf:"bytes,3,opt,name=v_str,json=vStr,proto3" json:"v_str,omitempty"` - VBool bool `protobuf:"varint,4,opt,name=v_bool,json=vBool,proto3" json:"v_bool,omitempty"` - VInt64 int64 `protobuf:"varint,5,opt,name=v_int64,json=vInt64,proto3" json:"v_int64,omitempty"` - VFloat64 float64 `protobuf:"fixed64,6,opt,name=v_float64,json=vFloat64,proto3" json:"v_float64,omitempty"` - VBinary []byte `protobuf:"bytes,7,opt,name=v_binary,json=vBinary,proto3" json:"v_binary,omitempty"` + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + VType ValueType `protobuf:"varint,2,opt,name=v_type,json=vType,proto3,enum=jaeger.api_v2.ValueType" json:"v_type,omitempty"` + VStr string `protobuf:"bytes,3,opt,name=v_str,json=vStr,proto3" json:"v_str,omitempty"` + VBool bool `protobuf:"varint,4,opt,name=v_bool,json=vBool,proto3" json:"v_bool,omitempty"` + VInt64 int64 `protobuf:"varint,5,opt,name=v_int64,json=vInt64,proto3" json:"v_int64,omitempty"` + VFloat64 float64 `protobuf:"fixed64,6,opt,name=v_float64,json=vFloat64,proto3" json:"v_float64,omitempty"` + VBinary []byte `protobuf:"bytes,7,opt,name=v_binary,json=vBinary,proto3" json:"v_binary,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *KeyValue) Reset() { *m = KeyValue{} } +func (m *KeyValue) String() string { return proto.CompactTextString(m) } +func (*KeyValue) ProtoMessage() {} +func (*KeyValue) Descriptor() ([]byte, []int) { + return fileDescriptor_4c16552f9fdb66d8, []int{0} +} +func (m *KeyValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *KeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_KeyValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *KeyValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_KeyValue.Merge(m, src) +} +func (m *KeyValue) XXX_Size() int { + return m.Size() +} +func (m *KeyValue) XXX_DiscardUnknown() { + xxx_messageInfo_KeyValue.DiscardUnknown(m) } -func (m *KeyValue) Reset() { *m = KeyValue{} } -func (m *KeyValue) String() string { return proto.CompactTextString(m) } -func (*KeyValue) ProtoMessage() {} -func (*KeyValue) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{0} } +var xxx_messageInfo_KeyValue proto.InternalMessageInfo func (m *KeyValue) GetKey() string { if m != nil { @@ -165,14 +186,45 @@ func (m *KeyValue) GetVBinary() []byte { } type Log struct { - Timestamp time.Time `protobuf:"bytes,1,opt,name=timestamp,stdtime" json:"timestamp"` - Fields []KeyValue `protobuf:"bytes,2,rep,name=fields" json:"fields"` + Timestamp time.Time `protobuf:"bytes,1,opt,name=timestamp,proto3,stdtime" json:"timestamp"` + Fields []KeyValue `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Log) Reset() { *m = Log{} } +func (m *Log) String() string { return proto.CompactTextString(m) } +func (*Log) ProtoMessage() {} +func (*Log) Descriptor() ([]byte, []int) { + return fileDescriptor_4c16552f9fdb66d8, []int{1} +} +func (m *Log) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Log) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Log.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Log) XXX_Merge(src proto.Message) { + xxx_messageInfo_Log.Merge(m, src) +} +func (m *Log) XXX_Size() int { + return m.Size() +} +func (m *Log) XXX_DiscardUnknown() { + xxx_messageInfo_Log.DiscardUnknown(m) } -func (m *Log) Reset() { *m = Log{} } -func (m *Log) String() string { return proto.CompactTextString(m) } -func (*Log) ProtoMessage() {} -func (*Log) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{1} } +var xxx_messageInfo_Log proto.InternalMessageInfo func (m *Log) GetTimestamp() time.Time { if m != nil { @@ -189,15 +241,46 @@ func (m *Log) GetFields() []KeyValue { } type SpanRef struct { - TraceID TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=TraceID" json:"trace_id"` - SpanID SpanID `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3,customtype=SpanID" json:"span_id"` - RefType SpanRefType `protobuf:"varint,3,opt,name=ref_type,json=refType,proto3,enum=jaeger.api_v2.SpanRefType" json:"ref_type,omitempty"` + TraceID TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=TraceID" json:"trace_id"` + SpanID SpanID `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3,customtype=SpanID" json:"span_id"` + RefType SpanRefType `protobuf:"varint,3,opt,name=ref_type,json=refType,proto3,enum=jaeger.api_v2.SpanRefType" json:"ref_type,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SpanRef) Reset() { *m = SpanRef{} } +func (m *SpanRef) String() string { return proto.CompactTextString(m) } +func (*SpanRef) ProtoMessage() {} +func (*SpanRef) Descriptor() ([]byte, []int) { + return fileDescriptor_4c16552f9fdb66d8, []int{2} +} +func (m *SpanRef) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SpanRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpanRef.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SpanRef) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpanRef.Merge(m, src) +} +func (m *SpanRef) XXX_Size() int { + return m.Size() +} +func (m *SpanRef) XXX_DiscardUnknown() { + xxx_messageInfo_SpanRef.DiscardUnknown(m) } -func (m *SpanRef) Reset() { *m = SpanRef{} } -func (m *SpanRef) String() string { return proto.CompactTextString(m) } -func (*SpanRef) ProtoMessage() {} -func (*SpanRef) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{2} } +var xxx_messageInfo_SpanRef proto.InternalMessageInfo func (m *SpanRef) GetRefType() SpanRefType { if m != nil { @@ -207,14 +290,45 @@ func (m *SpanRef) GetRefType() SpanRefType { } type Process struct { - ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` - Tags []KeyValue `protobuf:"bytes,2,rep,name=tags" json:"tags"` + ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` + Tags []KeyValue `protobuf:"bytes,2,rep,name=tags,proto3" json:"tags"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Process) Reset() { *m = Process{} } +func (m *Process) String() string { return proto.CompactTextString(m) } +func (*Process) ProtoMessage() {} +func (*Process) Descriptor() ([]byte, []int) { + return fileDescriptor_4c16552f9fdb66d8, []int{3} +} +func (m *Process) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Process) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Process.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Process) XXX_Merge(src proto.Message) { + xxx_messageInfo_Process.Merge(m, src) +} +func (m *Process) XXX_Size() int { + return m.Size() +} +func (m *Process) XXX_DiscardUnknown() { + xxx_messageInfo_Process.DiscardUnknown(m) } -func (m *Process) Reset() { *m = Process{} } -func (m *Process) String() string { return proto.CompactTextString(m) } -func (*Process) ProtoMessage() {} -func (*Process) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{3} } +var xxx_messageInfo_Process proto.InternalMessageInfo func (m *Process) GetServiceName() string { if m != nil { @@ -231,24 +345,55 @@ func (m *Process) GetTags() []KeyValue { } type Span struct { - TraceID TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=TraceID" json:"trace_id"` - SpanID SpanID `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3,customtype=SpanID" json:"span_id"` - OperationName string `protobuf:"bytes,3,opt,name=operation_name,json=operationName,proto3" json:"operation_name,omitempty"` - References []SpanRef `protobuf:"bytes,4,rep,name=references" json:"references"` - Flags Flags `protobuf:"varint,5,opt,name=flags,proto3,customtype=Flags" json:"flags"` - StartTime time.Time `protobuf:"bytes,6,opt,name=start_time,json=startTime,stdtime" json:"start_time"` - Duration time.Duration `protobuf:"bytes,7,opt,name=duration,stdduration" json:"duration"` - Tags []KeyValue `protobuf:"bytes,8,rep,name=tags" json:"tags"` - Logs []Log `protobuf:"bytes,9,rep,name=logs" json:"logs"` - Process *Process `protobuf:"bytes,10,opt,name=process" json:"process,omitempty"` - ProcessID string `protobuf:"bytes,11,opt,name=process_id,json=processId,proto3" json:"process_id,omitempty"` - Warnings []string `protobuf:"bytes,12,rep,name=warnings" json:"warnings,omitempty"` -} - -func (m *Span) Reset() { *m = Span{} } -func (m *Span) String() string { return proto.CompactTextString(m) } -func (*Span) ProtoMessage() {} -func (*Span) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{4} } + TraceID TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=TraceID" json:"trace_id"` + SpanID SpanID `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3,customtype=SpanID" json:"span_id"` + OperationName string `protobuf:"bytes,3,opt,name=operation_name,json=operationName,proto3" json:"operation_name,omitempty"` + References []SpanRef `protobuf:"bytes,4,rep,name=references,proto3" json:"references"` + Flags Flags `protobuf:"varint,5,opt,name=flags,proto3,customtype=Flags" json:"flags"` + StartTime time.Time `protobuf:"bytes,6,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time"` + Duration time.Duration `protobuf:"bytes,7,opt,name=duration,proto3,stdduration" json:"duration"` + Tags []KeyValue `protobuf:"bytes,8,rep,name=tags,proto3" json:"tags"` + Logs []Log `protobuf:"bytes,9,rep,name=logs,proto3" json:"logs"` + Process *Process `protobuf:"bytes,10,opt,name=process,proto3" json:"process,omitempty"` + ProcessID string `protobuf:"bytes,11,opt,name=process_id,json=processId,proto3" json:"process_id,omitempty"` + Warnings []string `protobuf:"bytes,12,rep,name=warnings,proto3" json:"warnings,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Span) Reset() { *m = Span{} } +func (m *Span) String() string { return proto.CompactTextString(m) } +func (*Span) ProtoMessage() {} +func (*Span) Descriptor() ([]byte, []int) { + return fileDescriptor_4c16552f9fdb66d8, []int{4} +} +func (m *Span) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Span) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Span.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Span) XXX_Merge(src proto.Message) { + xxx_messageInfo_Span.Merge(m, src) +} +func (m *Span) XXX_Size() int { + return m.Size() +} +func (m *Span) XXX_DiscardUnknown() { + xxx_messageInfo_Span.DiscardUnknown(m) +} + +var xxx_messageInfo_Span proto.InternalMessageInfo func (m *Span) GetOperationName() string { if m != nil { @@ -314,15 +459,46 @@ func (m *Span) GetWarnings() []string { } type Trace struct { - Spans []*Span `protobuf:"bytes,1,rep,name=spans" json:"spans,omitempty"` - ProcessMap []Trace_ProcessMapping `protobuf:"bytes,2,rep,name=process_map,json=processMap" json:"process_map"` - Warnings []string `protobuf:"bytes,3,rep,name=warnings" json:"warnings,omitempty"` + Spans []*Span `protobuf:"bytes,1,rep,name=spans,proto3" json:"spans,omitempty"` + ProcessMap []Trace_ProcessMapping `protobuf:"bytes,2,rep,name=process_map,json=processMap,proto3" json:"process_map"` + Warnings []string `protobuf:"bytes,3,rep,name=warnings,proto3" json:"warnings,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Trace) Reset() { *m = Trace{} } +func (m *Trace) String() string { return proto.CompactTextString(m) } +func (*Trace) ProtoMessage() {} +func (*Trace) Descriptor() ([]byte, []int) { + return fileDescriptor_4c16552f9fdb66d8, []int{5} +} +func (m *Trace) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Trace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Trace.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Trace) XXX_Merge(src proto.Message) { + xxx_messageInfo_Trace.Merge(m, src) +} +func (m *Trace) XXX_Size() int { + return m.Size() +} +func (m *Trace) XXX_DiscardUnknown() { + xxx_messageInfo_Trace.DiscardUnknown(m) } -func (m *Trace) Reset() { *m = Trace{} } -func (m *Trace) String() string { return proto.CompactTextString(m) } -func (*Trace) ProtoMessage() {} -func (*Trace) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{5} } +var xxx_messageInfo_Trace proto.InternalMessageInfo func (m *Trace) GetSpans() []*Span { if m != nil { @@ -346,14 +522,45 @@ func (m *Trace) GetWarnings() []string { } type Trace_ProcessMapping struct { - ProcessID string `protobuf:"bytes,1,opt,name=process_id,json=processId,proto3" json:"process_id,omitempty"` - Process Process `protobuf:"bytes,2,opt,name=process" json:"process"` + ProcessID string `protobuf:"bytes,1,opt,name=process_id,json=processId,proto3" json:"process_id,omitempty"` + Process Process `protobuf:"bytes,2,opt,name=process,proto3" json:"process"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Trace_ProcessMapping) Reset() { *m = Trace_ProcessMapping{} } +func (m *Trace_ProcessMapping) String() string { return proto.CompactTextString(m) } +func (*Trace_ProcessMapping) ProtoMessage() {} +func (*Trace_ProcessMapping) Descriptor() ([]byte, []int) { + return fileDescriptor_4c16552f9fdb66d8, []int{5, 0} +} +func (m *Trace_ProcessMapping) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Trace_ProcessMapping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Trace_ProcessMapping.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Trace_ProcessMapping) XXX_Merge(src proto.Message) { + xxx_messageInfo_Trace_ProcessMapping.Merge(m, src) +} +func (m *Trace_ProcessMapping) XXX_Size() int { + return m.Size() +} +func (m *Trace_ProcessMapping) XXX_DiscardUnknown() { + xxx_messageInfo_Trace_ProcessMapping.DiscardUnknown(m) } -func (m *Trace_ProcessMapping) Reset() { *m = Trace_ProcessMapping{} } -func (m *Trace_ProcessMapping) String() string { return proto.CompactTextString(m) } -func (*Trace_ProcessMapping) ProtoMessage() {} -func (*Trace_ProcessMapping) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{5, 0} } +var xxx_messageInfo_Trace_ProcessMapping proto.InternalMessageInfo func (m *Trace_ProcessMapping) GetProcessID() string { if m != nil { @@ -370,14 +577,45 @@ func (m *Trace_ProcessMapping) GetProcess() Process { } type Batch struct { - Spans []*Span `protobuf:"bytes,1,rep,name=spans" json:"spans,omitempty"` - Process *Process `protobuf:"bytes,2,opt,name=process" json:"process,omitempty"` + Spans []*Span `protobuf:"bytes,1,rep,name=spans,proto3" json:"spans,omitempty"` + Process *Process `protobuf:"bytes,2,opt,name=process,proto3" json:"process,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Batch) Reset() { *m = Batch{} } +func (m *Batch) String() string { return proto.CompactTextString(m) } +func (*Batch) ProtoMessage() {} +func (*Batch) Descriptor() ([]byte, []int) { + return fileDescriptor_4c16552f9fdb66d8, []int{6} +} +func (m *Batch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Batch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Batch.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Batch) XXX_Merge(src proto.Message) { + xxx_messageInfo_Batch.Merge(m, src) +} +func (m *Batch) XXX_Size() int { + return m.Size() +} +func (m *Batch) XXX_DiscardUnknown() { + xxx_messageInfo_Batch.DiscardUnknown(m) } -func (m *Batch) Reset() { *m = Batch{} } -func (m *Batch) String() string { return proto.CompactTextString(m) } -func (*Batch) ProtoMessage() {} -func (*Batch) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{6} } +var xxx_messageInfo_Batch proto.InternalMessageInfo func (m *Batch) GetSpans() []*Span { if m != nil { @@ -394,6 +632,10 @@ func (m *Batch) GetProcess() *Process { } func init() { + proto.RegisterEnum("jaeger.api_v2.ValueType", ValueType_name, ValueType_value) + golang_proto.RegisterEnum("jaeger.api_v2.ValueType", ValueType_name, ValueType_value) + proto.RegisterEnum("jaeger.api_v2.SpanRefType", SpanRefType_name, SpanRefType_value) + golang_proto.RegisterEnum("jaeger.api_v2.SpanRefType", SpanRefType_name, SpanRefType_value) proto.RegisterType((*KeyValue)(nil), "jaeger.api_v2.KeyValue") golang_proto.RegisterType((*KeyValue)(nil), "jaeger.api_v2.KeyValue") proto.RegisterType((*Log)(nil), "jaeger.api_v2.Log") @@ -410,11 +652,72 @@ func init() { golang_proto.RegisterType((*Trace_ProcessMapping)(nil), "jaeger.api_v2.Trace.ProcessMapping") proto.RegisterType((*Batch)(nil), "jaeger.api_v2.Batch") golang_proto.RegisterType((*Batch)(nil), "jaeger.api_v2.Batch") - proto.RegisterEnum("jaeger.api_v2.ValueType", ValueType_name, ValueType_value) - golang_proto.RegisterEnum("jaeger.api_v2.ValueType", ValueType_name, ValueType_value) - proto.RegisterEnum("jaeger.api_v2.SpanRefType", SpanRefType_name, SpanRefType_value) - golang_proto.RegisterEnum("jaeger.api_v2.SpanRefType", SpanRefType_name, SpanRefType_value) } + +func init() { proto.RegisterFile("model.proto", fileDescriptor_4c16552f9fdb66d8) } +func init() { golang_proto.RegisterFile("model.proto", fileDescriptor_4c16552f9fdb66d8) } + +var fileDescriptor_4c16552f9fdb66d8 = []byte{ + // 905 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0x41, 0x8f, 0xdb, 0x44, + 0x14, 0xde, 0x49, 0xec, 0xd8, 0x79, 0x49, 0x56, 0xd1, 0x14, 0x58, 0x37, 0xa0, 0x24, 0xa4, 0x42, + 0x0a, 0x55, 0x49, 0xda, 0xd0, 0xee, 0x01, 0x21, 0xa1, 0xba, 0x4b, 0xc0, 0x90, 0xdd, 0xa0, 0xd9, + 0x08, 0x04, 0x17, 0x6b, 0x36, 0x99, 0x18, 0x17, 0xc7, 0x63, 0xd9, 0x5e, 0xa3, 0xdc, 0xf8, 0x09, + 0x88, 0x13, 0x47, 0xb8, 0xf2, 0x2b, 0x38, 0xf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0f, 0xf0, + 0x01, 0x18, 0x99, 0xeb, 0x87, 0xe9, 0xe1, 0x7d, 0x4b, 0xef, 0xa2, 0x7e, 0x99, 0x54, 0x32, 0x47, + 0xec, 0xf0, 0xab, 0x50, 0xcd, 0xdc, 0x65, 0xc0, 0xa9, 0x08, 0x55, 0xba, 0xa8, 0x8f, 0x88, 0x99, + 0x8d, 0xf3, 0x3d, 0xbe, 0x09, 0x66, 0xe6, 0x9e, 0xf9, 0x21, 0x8d, 0xd7, 0x96, 0xd1, 0x45, 0xfd, + 0x3a, 0x31, 0x32, 0x5b, 0x6e, 0xdf, 0x31, 0x9f, 0xfe, 0xd0, 0x41, 0x4f, 0x7f, 0xec, 0xa0, 0xde, + 0x37, 0x08, 0xca, 0x13, 0xee, 0x61, 0x1b, 0xaa, 0x5b, 0x45, 0x64, 0x5f, 0xb5, 0x51, 0x6b, 0x90, + 0x4b, 0x32, 0x28, 0x24, 0x19, 0xcc, 0x0a, 0x84, 0x6d, 0x3e, 0xb9, 0xe8, 0xec, 0x7d, 0xfb, 0x47, + 0x07, 0x91, 0xcb, 0x34, 0xfc, 0x00, 0x2a, 0x4b, 0x9f, 0x05, 0x8b, 0xc4, 0x2a, 0x75, 0xcb, 0xfd, + 0xda, 0xe8, 0x60, 0x47, 0x83, 0x42, 0x3e, 0x5b, 0x13, 0xd9, 0x44, 0x81, 0x7b, 0x3f, 0x21, 0x30, + 0x4e, 0x23, 0x1a, 0x12, 0xb6, 0xc4, 0x0f, 0xc0, 0x4c, 0x63, 0x3a, 0x67, 0xae, 0xbf, 0x90, 0x2c, + 0xea, 0x76, 0x4b, 0x60, 0x7f, 0xbb, 0xe8, 0x18, 0x33, 0x71, 0xee, 0x1c, 0x6d, 0x2e, 0x97, 0xc4, + 0x90, 0x58, 0x67, 0x81, 0xef, 0x81, 0x91, 0x44, 0x34, 0x14, 0x59, 0x25, 0x99, 0x65, 0xa9, 0xac, + 0x8a, 0x28, 0x2c, 0x93, 0xd4, 0x8a, 0x54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x5c, 0x03, 0x63, 0x3c, 0x99, 0x3e, 0x14, 0x9b, 0xb2, 0x40, 0xdb, 0xce, 0xc9, 0x43, + 0xf2, 0x79, 0x53, 0xbb, 0xfd, 0x16, 0xd4, 0x9e, 0xf9, 0x40, 0xe1, 0x3a, 0x98, 0x8f, 0x3e, 0x74, + 0x26, 0x47, 0xee, 0x74, 0xdc, 0xdc, 0xc3, 0x4d, 0xa8, 0x8f, 0xa7, 0x93, 0xc9, 0xf4, 0xb3, 0x53, + 0x77, 0x4c, 0xa6, 0xc7, 0x4d, 0x64, 0xdf, 0x7d, 0xb2, 0x69, 0xa3, 0x5f, 0x36, 0x6d, 0xf4, 0xe7, + 0xa6, 0x8d, 0x7e, 0xfe, 0xab, 0x8d, 0xe0, 0xc0, 0xe7, 0x8a, 0xb0, 0xf8, 0x74, 0xf8, 0xa1, 0xa7, + 0x78, 0x7f, 0xa1, 0xcb, 0x5f, 0xef, 0x59, 0x45, 0xbe, 0x2c, 0x6f, 0xff, 0x1d, 0x00, 0x00, 0xff, + 0xff, 0xc9, 0x46, 0x02, 0x11, 0x8a, 0x07, 0x00, 0x00, +} + func (this *KeyValue) Compare(that interface{}) int { if that == nil { if this == nil { @@ -479,14 +782,14 @@ func (this *KeyValue) Compare(that interface{}) int { if c := bytes.Compare(this.VBinary, that1.VBinary); c != 0 { return c } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } return 0 } func (this *KeyValue) Equal(that interface{}) bool { if that == nil { - if this == nil { - return true - } - return false + return this == nil } that1, ok := that.(*KeyValue) @@ -499,10 +802,7 @@ func (this *KeyValue) Equal(that interface{}) bool { } } if that1 == nil { - if this == nil { - return true - } - return false + return this == nil } else if this == nil { return false } @@ -527,6 +827,9 @@ func (this *KeyValue) Equal(that interface{}) bool { if !bytes.Equal(this.VBinary, that1.VBinary) { return false } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } return true } func (m *KeyValue) Marshal() (dAtA []byte, err error) { @@ -579,7 +882,7 @@ func (m *KeyValue) MarshalTo(dAtA []byte) (int, error) { if m.VFloat64 != 0 { dAtA[i] = 0x31 i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.VFloat64)))) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.VFloat64)))) i += 8 } if len(m.VBinary) > 0 { @@ -588,6 +891,9 @@ func (m *KeyValue) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintModel(dAtA, i, uint64(len(m.VBinary))) i += copy(dAtA[i:], m.VBinary) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -608,8 +914,8 @@ func (m *Log) MarshalTo(dAtA []byte) (int, error) { _ = l dAtA[i] = 0xa i++ - i = encodeVarintModel(dAtA, i, uint64(types.SizeOfStdTime(m.Timestamp))) - n1, err := types.StdTimeMarshalTo(m.Timestamp, dAtA[i:]) + i = encodeVarintModel(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp))) + n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i:]) if err != nil { return 0, err } @@ -626,6 +932,9 @@ func (m *Log) MarshalTo(dAtA []byte) (int, error) { i += n } } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -665,6 +974,9 @@ func (m *SpanRef) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintModel(dAtA, i, uint64(m.RefType)) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -701,6 +1013,9 @@ func (m *Process) MarshalTo(dAtA []byte) (int, error) { i += n } } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -760,16 +1075,16 @@ func (m *Span) MarshalTo(dAtA []byte) (int, error) { } dAtA[i] = 0x32 i++ - i = encodeVarintModel(dAtA, i, uint64(types.SizeOfStdTime(m.StartTime))) - n6, err := types.StdTimeMarshalTo(m.StartTime, dAtA[i:]) + i = encodeVarintModel(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime))) + n6, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTime, dAtA[i:]) if err != nil { return 0, err } i += n6 dAtA[i] = 0x3a i++ - i = encodeVarintModel(dAtA, i, uint64(types.SizeOfStdDuration(m.Duration))) - n7, err := types.StdDurationMarshalTo(m.Duration, dAtA[i:]) + i = encodeVarintModel(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration))) + n7, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Duration, dAtA[i:]) if err != nil { return 0, err } @@ -829,6 +1144,9 @@ func (m *Span) MarshalTo(dAtA []byte) (int, error) { i += copy(dAtA[i:], s) } } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -886,6 +1204,9 @@ func (m *Trace) MarshalTo(dAtA []byte) (int, error) { i += copy(dAtA[i:], s) } } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -918,6 +1239,9 @@ func (m *Trace_ProcessMapping) MarshalTo(dAtA []byte) (int, error) { return 0, err } i += n9 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -958,6 +1282,9 @@ func (m *Batch) MarshalTo(dAtA []byte) (int, error) { } i += n10 } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -971,6 +1298,9 @@ func encodeVarintModel(dAtA []byte, offset int, v uint64) int { return offset + 1 } func (m *KeyValue) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Key) @@ -997,13 +1327,19 @@ func (m *KeyValue) Size() (n int) { if l > 0 { n += 1 + l + sovModel(uint64(l)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *Log) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - l = types.SizeOfStdTime(m.Timestamp) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) n += 1 + l + sovModel(uint64(l)) if len(m.Fields) > 0 { for _, e := range m.Fields { @@ -1011,10 +1347,16 @@ func (m *Log) Size() (n int) { n += 1 + l + sovModel(uint64(l)) } } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *SpanRef) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.TraceID.Size() @@ -1024,10 +1366,16 @@ func (m *SpanRef) Size() (n int) { if m.RefType != 0 { n += 1 + sovModel(uint64(m.RefType)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *Process) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.ServiceName) @@ -1040,10 +1388,16 @@ func (m *Process) Size() (n int) { n += 1 + l + sovModel(uint64(l)) } } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *Span) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.TraceID.Size() @@ -1063,9 +1417,9 @@ func (m *Span) Size() (n int) { if m.Flags != 0 { n += 1 + sovModel(uint64(m.Flags)) } - l = types.SizeOfStdTime(m.StartTime) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime) n += 1 + l + sovModel(uint64(l)) - l = types.SizeOfStdDuration(m.Duration) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration) n += 1 + l + sovModel(uint64(l)) if len(m.Tags) > 0 { for _, e := range m.Tags { @@ -1093,10 +1447,16 @@ func (m *Span) Size() (n int) { n += 1 + l + sovModel(uint64(l)) } } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *Trace) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Spans) > 0 { @@ -1117,10 +1477,16 @@ func (m *Trace) Size() (n int) { n += 1 + l + sovModel(uint64(l)) } } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *Trace_ProcessMapping) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.ProcessID) @@ -1129,10 +1495,16 @@ func (m *Trace_ProcessMapping) Size() (n int) { } l = m.Process.Size() n += 1 + l + sovModel(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *Batch) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Spans) > 0 { @@ -1145,6 +1517,9 @@ func (m *Batch) Size() (n int) { l = m.Process.Size() n += 1 + l + sovModel(uint64(l)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -1176,7 +1551,7 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1204,7 +1579,7 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1214,6 +1589,9 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1233,7 +1611,7 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.VType |= (ValueType(b) & 0x7F) << shift + m.VType |= ValueType(b&0x7F) << shift if b < 0x80 { break } @@ -1252,7 +1630,7 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1262,6 +1640,9 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1281,7 +1662,7 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1301,7 +1682,7 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.VInt64 |= (int64(b) & 0x7F) << shift + m.VInt64 |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1314,7 +1695,7 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.VFloat64 = float64(math.Float64frombits(v)) case 7: @@ -1331,7 +1712,7 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1340,6 +1721,9 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1357,9 +1741,13 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthModel } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModel + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -1384,7 +1772,7 @@ func (m *Log) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1412,7 +1800,7 @@ func (m *Log) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1421,10 +1809,13 @@ func (m *Log) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } - if err := types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1442,7 +1833,7 @@ func (m *Log) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1451,6 +1842,9 @@ func (m *Log) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1468,9 +1862,13 @@ func (m *Log) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthModel } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModel + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -1495,7 +1893,7 @@ func (m *SpanRef) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1523,7 +1921,7 @@ func (m *SpanRef) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1532,6 +1930,9 @@ func (m *SpanRef) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1553,7 +1954,7 @@ func (m *SpanRef) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1562,6 +1963,9 @@ func (m *SpanRef) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1583,7 +1987,7 @@ func (m *SpanRef) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.RefType |= (SpanRefType(b) & 0x7F) << shift + m.RefType |= SpanRefType(b&0x7F) << shift if b < 0x80 { break } @@ -1597,9 +2001,13 @@ func (m *SpanRef) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthModel } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModel + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -1624,7 +2032,7 @@ func (m *Process) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1652,7 +2060,7 @@ func (m *Process) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1662,6 +2070,9 @@ func (m *Process) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1681,7 +2092,7 @@ func (m *Process) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1690,6 +2101,9 @@ func (m *Process) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1707,9 +2121,13 @@ func (m *Process) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthModel } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModel + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -1734,7 +2152,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1762,7 +2180,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1771,6 +2189,9 @@ func (m *Span) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1792,7 +2213,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1801,6 +2222,9 @@ func (m *Span) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1822,7 +2246,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1832,6 +2256,9 @@ func (m *Span) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1851,7 +2278,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1860,6 +2287,9 @@ func (m *Span) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1882,7 +2312,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Flags |= (Flags(b) & 0x7F) << shift + m.Flags |= Flags(b&0x7F) << shift if b < 0x80 { break } @@ -1901,7 +2331,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1910,10 +2340,13 @@ func (m *Span) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } - if err := types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1931,7 +2364,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1940,10 +2373,13 @@ func (m *Span) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } - if err := types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1961,7 +2397,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1970,6 +2406,9 @@ func (m *Span) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1992,7 +2431,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2001,6 +2440,9 @@ func (m *Span) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2023,7 +2465,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2032,6 +2474,9 @@ func (m *Span) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2056,7 +2501,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2066,6 +2511,9 @@ func (m *Span) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2085,7 +2533,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2095,6 +2543,9 @@ func (m *Span) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2109,9 +2560,13 @@ func (m *Span) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthModel } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModel + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -2136,7 +2591,7 @@ func (m *Trace) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2164,7 +2619,7 @@ func (m *Trace) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2173,6 +2628,9 @@ func (m *Trace) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2195,7 +2653,7 @@ func (m *Trace) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2204,6 +2662,9 @@ func (m *Trace) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2226,7 +2687,7 @@ func (m *Trace) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2236,6 +2697,9 @@ func (m *Trace) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2250,9 +2714,13 @@ func (m *Trace) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthModel } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModel + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -2277,7 +2745,7 @@ func (m *Trace_ProcessMapping) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2305,7 +2773,7 @@ func (m *Trace_ProcessMapping) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2315,6 +2783,9 @@ func (m *Trace_ProcessMapping) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2334,7 +2805,7 @@ func (m *Trace_ProcessMapping) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2343,6 +2814,9 @@ func (m *Trace_ProcessMapping) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2359,9 +2833,13 @@ func (m *Trace_ProcessMapping) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthModel } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModel + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -2386,7 +2864,7 @@ func (m *Batch) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2414,7 +2892,7 @@ func (m *Batch) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2423,6 +2901,9 @@ func (m *Batch) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2445,7 +2926,7 @@ func (m *Batch) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2454,6 +2935,9 @@ func (m *Batch) Unmarshal(dAtA []byte) error { return ErrInvalidLengthModel } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModel + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2473,9 +2957,13 @@ func (m *Batch) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthModel } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthModel + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -2539,10 +3027,13 @@ func skipModel(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthModel } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthModel + } return iNdEx, nil case 3: for { @@ -2571,6 +3062,9 @@ func skipModel(dAtA []byte) (n int, err error) { return 0, err } iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthModel + } } return iNdEx, nil case 4: @@ -2589,67 +3083,3 @@ var ( ErrInvalidLengthModel = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowModel = fmt.Errorf("proto: integer overflow") ) - -func init() { proto.RegisterFile("model.proto", fileDescriptorModel) } -func init() { golang_proto.RegisterFile("model.proto", fileDescriptorModel) } - -var fileDescriptorModel = []byte{ - // 905 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0x41, 0x8f, 0xdb, 0x44, - 0x14, 0xde, 0x49, 0xec, 0xd8, 0x79, 0x49, 0x56, 0xd1, 0x14, 0x58, 0x37, 0xa0, 0x24, 0xa4, 0x42, - 0x0a, 0x55, 0x49, 0xda, 0xd0, 0xee, 0x01, 0x21, 0xa1, 0xba, 0x4b, 0xc0, 0x90, 0xdd, 0xa0, 0xd9, - 0x08, 0x04, 0x17, 0x6b, 0x36, 0x99, 0x18, 0x17, 0xc7, 0x63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0x3d, 0x9d, 0x4e, 0x9a, 0x08, 0x57, 0x41, 0x77, 0x4e, 0x66, 0x87, 0xf7, - 0x9b, 0x25, 0x5c, 0x03, 0x63, 0x3c, 0x99, 0x3e, 0x14, 0x9b, 0xb2, 0x40, 0xdb, 0xce, 0xc9, 0x43, - 0xf2, 0x79, 0x53, 0xbb, 0xfd, 0x16, 0xd4, 0x9e, 0xf9, 0x40, 0xe1, 0x3a, 0x98, 0x8f, 0x3e, 0x74, - 0x26, 0x47, 0xee, 0x74, 0xdc, 0xdc, 0xc3, 0x4d, 0xa8, 0x8f, 0xa7, 0x93, 0xc9, 0xf4, 0xb3, 0x53, - 0x77, 0x4c, 0xa6, 0xc7, 0x4d, 0x64, 0xdf, 0x7d, 0xb2, 0x69, 0xa3, 0x5f, 0x36, 0x6d, 0xf4, 0xe7, - 0xa6, 0x8d, 0x7e, 0xfe, 0xab, 0x8d, 0xe0, 0xc0, 0xe7, 0x8a, 0xb0, 0xf8, 0x74, 0xf8, 0xa1, 0xa7, - 0x78, 0x7f, 0xa1, 0xcb, 0x5f, 0xef, 0x59, 0x45, 0xbe, 0x2c, 0x6f, 0xff, 0x1d, 0x00, 0x00, 0xff, - 0xff, 0xc9, 0x46, 0x02, 0x11, 0x8a, 0x07, 0x00, 0x00, -} diff --git a/model/proto/api_v2/collector.proto b/model/proto/api_v2/collector.proto new file mode 100644 index 00000000000..e897a043cd6 --- /dev/null +++ b/model/proto/api_v2/collector.proto @@ -0,0 +1,66 @@ +// Copyright (c) 2019 The Jaeger Authors. +// Copyright (c) 2018 Uber Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax="proto3"; + +package jaeger.api_v2; + +import "model.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "protoc-gen-swagger/options/annotations.proto"; + +option go_package = "api_v2"; +option java_package = "io.jaegertracing.api_v2"; + +// Enable gogoprotobuf extensions (https://github.com/gogo/protobuf/blob/master/extensions.md). +// Enable custom Marshal method. +option (gogoproto.marshaler_all) = true; +// Enable custom Unmarshal method. +option (gogoproto.unmarshaler_all) = true; +// Enable custom Size method (Required by Marshal and Unmarshal). +option (gogoproto.sizer_all) = true; +// Enable registration with golang/protobuf for the grpc-gateway. +option (gogoproto.goproto_registration) = true; + +option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { + info: { + version: "1.0"; + }; + external_docs: { + url: "https://github.com/jaegertracing/jaeger"; + description: "Jaeger API"; + } + schemes: HTTP; + schemes: HTTPS; +}; + +message PostSpansRequest { + Batch batch = 1 [ + (gogoproto.nullable) = false + ]; +} + +message PostSpansResponse { +} + +service CollectorService { + rpc PostSpans(PostSpansRequest) returns (PostSpansResponse) { + option (google.api.http) = { + post: "/api/v2/spans" + body: "*" + }; + } +} diff --git a/model/proto/api_v2.proto b/model/proto/api_v2/sampling.proto similarity index 88% rename from model/proto/api_v2.proto rename to model/proto/api_v2/sampling.proto index 1fbc358aacd..918699d662f 100644 --- a/model/proto/api_v2.proto +++ b/model/proto/api_v2/sampling.proto @@ -1,3 +1,4 @@ +// Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2018 Uber Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,7 +17,6 @@ syntax="proto3"; package jaeger.api_v2; -import "model.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "protoc-gen-swagger/options/annotations.proto"; @@ -46,24 +46,6 @@ option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { schemes: HTTPS; }; -message PostSpansRequest { - Batch batch = 1 [ - (gogoproto.nullable) = false - ]; -} - -message PostSpansResponse { -} - -service CollectorService { - rpc PostSpans(PostSpansRequest) returns (PostSpansResponse) { - option (google.api.http) = { - post: "/api/v2/spans" - body: "*" - }; - } -} - enum SamplingStrategyType { PROBABILISTIC = 0; RATE_LIMITING = 1; @@ -108,4 +90,3 @@ service SamplingManager { }; } } - diff --git a/proto-gen/api_v2/collector.pb.go b/proto-gen/api_v2/collector.pb.go new file mode 100644 index 00000000000..7aad7a6247f --- /dev/null +++ b/proto-gen/api_v2/collector.pb.go @@ -0,0 +1,573 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: api_v2/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" + golang_proto "github.com/golang/protobuf/proto" + _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + model "github.com/jaegertracing/jaeger/model" + grpc "google.golang.org/grpc" + io "io" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = golang_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.GoGoProtoPackageIsVersion2 // 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_495529cb13d121cf, []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.MarshalTo(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_495529cb13d121cf, []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.MarshalTo(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") + golang_proto.RegisterType((*PostSpansRequest)(nil), "jaeger.api_v2.PostSpansRequest") + proto.RegisterType((*PostSpansResponse)(nil), "jaeger.api_v2.PostSpansResponse") + golang_proto.RegisterType((*PostSpansResponse)(nil), "jaeger.api_v2.PostSpansResponse") +} + +func init() { proto.RegisterFile("api_v2/collector.proto", fileDescriptor_495529cb13d121cf) } +func init() { golang_proto.RegisterFile("api_v2/collector.proto", fileDescriptor_495529cb13d121cf) } + +var fileDescriptor_495529cb13d121cf = []byte{ + // 336 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0x31, 0x4f, 0xc2, 0x40, + 0x14, 0xc7, 0x3d, 0x14, 0x12, 0x8f, 0x90, 0x60, 0x25, 0x4a, 0x88, 0x29, 0xa4, 0x8b, 0x86, 0x48, + 0x0f, 0x6b, 0x5c, 0xd8, 0xa8, 0x2e, 0x3a, 0x11, 0xd8, 0x5c, 0xcc, 0x51, 0x2f, 0xd7, 0x9a, 0x72, + 0xef, 0xbc, 0x3b, 0xea, 0xe2, 0xe4, 0x47, 0xd0, 0x2f, 0xe4, 0xc8, 0x68, 0xe2, 0x6e, 0x0c, 0xfa, + 0x41, 0x0c, 0x6d, 0x35, 0x82, 0x71, 0x7a, 0xef, 0xee, 0xff, 0xcb, 0xff, 0xfd, 0xdf, 0xc3, 0x3b, + 0x54, 0x46, 0x57, 0x89, 0x47, 0x02, 0x88, 0x63, 0x16, 0x18, 0x50, 0xae, 0x54, 0x60, 0xc0, 0xaa, + 0xdc, 0x50, 0xc6, 0x99, 0x72, 0x33, 0xb9, 0x51, 0x9e, 0xc0, 0x35, 0x8b, 0x33, 0xad, 0x51, 0xe3, + 0xc0, 0x21, 0x6d, 0xc9, 0xa2, 0xcb, 0x7f, 0xf7, 0x38, 0x00, 0x8f, 0x19, 0xa1, 0x32, 0x22, 0x54, + 0x08, 0x30, 0xd4, 0x44, 0x20, 0x74, 0xae, 0x1e, 0xa6, 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e, 0xa5, + 0x77, 0x3d, 0xfe, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x5b, 0xe8, 0xa6, 0x4c, 0xef, 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) +} + +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: "api_v2/collector.proto", +} + +func (m *PostSpansRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PostSpansRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintCollector(dAtA, i, uint64(m.Batch.Size())) + n1, err := m.Batch.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *PostSpansResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PostSpansResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintCollector(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +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) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +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 { + return ErrInvalidLengthCollector + } + if (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 { + return ErrInvalidLengthCollector + } + if (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 + 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 + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + 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 + if iNdEx < 0 { + return 0, ErrInvalidLengthCollector + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCollector + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipCollector(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthCollector + } + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthCollector = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCollector = fmt.Errorf("proto: integer overflow") +) diff --git a/proto-gen/api_v2/collector.pb.gw.go b/proto-gen/api_v2/collector.pb.gw.go new file mode 100644 index 00000000000..5b6ca10d111 --- /dev/null +++ b/proto-gen/api_v2/collector.pb.gw.go @@ -0,0 +1,115 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: api_v2/collector.proto + +/* +Package api_v2 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package api_v2 + +import ( + "io" + "net/http" + + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "golang.org/x/net/context" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/status" +) + +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray + +func request_CollectorService_PostSpans_0(ctx context.Context, marshaler runtime.Marshaler, client CollectorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PostSpansRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.PostSpans(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +// RegisterCollectorServiceHandlerFromEndpoint is same as RegisterCollectorServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterCollectorServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterCollectorServiceHandler(ctx, mux, conn) +} + +// RegisterCollectorServiceHandler registers the http handlers for service CollectorService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterCollectorServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterCollectorServiceHandlerClient(ctx, mux, NewCollectorServiceClient(conn)) +} + +// RegisterCollectorServiceHandlerClient registers the http handlers for service CollectorService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CollectorServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CollectorServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "CollectorServiceClient" to call the correct interceptors. +func RegisterCollectorServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CollectorServiceClient) error { + + mux.Handle("POST", pattern_CollectorService_PostSpans_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_CollectorService_PostSpans_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_CollectorService_PostSpans_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_CollectorService_PostSpans_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "spans"}, "")) +) + +var ( + forward_CollectorService_PostSpans_0 = runtime.ForwardResponseMessage +) diff --git a/proto-gen/api_v2/api_v2.pb.go b/proto-gen/api_v2/sampling.pb.go similarity index 59% rename from proto-gen/api_v2/api_v2.pb.go rename to proto-gen/api_v2/sampling.pb.go index 64affc52580..8f40c58c7a4 100644 --- a/proto-gen/api_v2/api_v2.pb.go +++ b/proto-gen/api_v2/sampling.pb.go @@ -1,39 +1,21 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: api_v2.proto - -/* - Package api_v2 is a generated protocol buffer package. - - It is generated from these files: - api_v2.proto - - It has these top-level messages: - PostSpansRequest - PostSpansResponse - ProbabilisticSamplingStrategy - RateLimitingSamplingStrategy - OperationSamplingStrategy - PerOperationSamplingStrategies - SamplingStrategyResponse - SamplingStrategyParameters -*/ -package api_v2 - -import proto "github.com/gogo/protobuf/proto" -import golang_proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import jaeger_api_v2 "github.com/jaegertracing/jaeger/model" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/googleapis/google/api" -import _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" - -import context "golang.org/x/net/context" -import grpc "google.golang.org/grpc" +// source: api_v2/sampling.proto -import binary "encoding/binary" +package api_v2 -import io "io" +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" + golang_proto "github.com/golang/protobuf/proto" + _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + grpc "google.golang.org/grpc" + io "io" + math "math" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -58,6 +40,7 @@ var SamplingStrategyType_name = map[int32]string{ 0: "PROBABILISTIC", 1: "RATE_LIMITING", } + var SamplingStrategyType_value = map[string]int32{ "PROBABILISTIC": 0, "RATE_LIMITING": 1, @@ -66,42 +49,50 @@ var SamplingStrategyType_value = map[string]int32{ func (x SamplingStrategyType) String() string { return proto.EnumName(SamplingStrategyType_name, int32(x)) } -func (SamplingStrategyType) EnumDescriptor() ([]byte, []int) { return fileDescriptorApiV2, []int{0} } - -type PostSpansRequest struct { - Batch jaeger_api_v2.Batch `protobuf:"bytes,1,opt,name=batch" json:"batch"` -} - -func (m *PostSpansRequest) Reset() { *m = PostSpansRequest{} } -func (m *PostSpansRequest) String() string { return proto.CompactTextString(m) } -func (*PostSpansRequest) ProtoMessage() {} -func (*PostSpansRequest) Descriptor() ([]byte, []int) { return fileDescriptorApiV2, []int{0} } - -func (m *PostSpansRequest) GetBatch() jaeger_api_v2.Batch { - if m != nil { - return m.Batch - } - return jaeger_api_v2.Batch{} -} -type PostSpansResponse struct { +func (SamplingStrategyType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_80fcbf09c149c4e3, []int{0} } -func (m *PostSpansResponse) Reset() { *m = PostSpansResponse{} } -func (m *PostSpansResponse) String() string { return proto.CompactTextString(m) } -func (*PostSpansResponse) ProtoMessage() {} -func (*PostSpansResponse) Descriptor() ([]byte, []int) { return fileDescriptorApiV2, []int{1} } - type ProbabilisticSamplingStrategy struct { - SamplingRate float64 `protobuf:"fixed64,1,opt,name=samplingRate,proto3" json:"samplingRate,omitempty"` + 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 fileDescriptorApiV2, []int{2} + return fileDescriptor_80fcbf09c149c4e3, []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.MarshalTo(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 { @@ -111,15 +102,44 @@ func (m *ProbabilisticSamplingStrategy) GetSamplingRate() float64 { } type RateLimitingSamplingStrategy struct { - MaxTracesPerSecond int32 `protobuf:"varint,1,opt,name=maxTracesPerSecond,proto3" json:"maxTracesPerSecond,omitempty"` + 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 fileDescriptorApiV2, []int{3} + return fileDescriptor_80fcbf09c149c4e3, []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.MarshalTo(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 { @@ -130,13 +150,44 @@ func (m *RateLimitingSamplingStrategy) GetMaxTracesPerSecond() int32 { type OperationSamplingStrategy struct { Operation string `protobuf:"bytes,1,opt,name=operation,proto3" json:"operation,omitempty"` - ProbabilisticSampling *ProbabilisticSamplingStrategy `protobuf:"bytes,2,opt,name=probabilisticSampling" json:"probabilisticSampling,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_80fcbf09c149c4e3, []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.MarshalTo(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) } -func (m *OperationSamplingStrategy) Reset() { *m = OperationSamplingStrategy{} } -func (m *OperationSamplingStrategy) String() string { return proto.CompactTextString(m) } -func (*OperationSamplingStrategy) ProtoMessage() {} -func (*OperationSamplingStrategy) Descriptor() ([]byte, []int) { return fileDescriptorApiV2, []int{4} } +var xxx_messageInfo_OperationSamplingStrategy proto.InternalMessageInfo func (m *OperationSamplingStrategy) GetOperation() string { if m != nil { @@ -155,16 +206,45 @@ func (m *OperationSamplingStrategy) GetProbabilisticSampling() *ProbabilisticSam type PerOperationSamplingStrategies struct { DefaultSamplingProbability float64 `protobuf:"fixed64,1,opt,name=defaultSamplingProbability,proto3" json:"defaultSamplingProbability,omitempty"` DefaultLowerBoundTracesPerSecond float64 `protobuf:"fixed64,2,opt,name=defaultLowerBoundTracesPerSecond,proto3" json:"defaultLowerBoundTracesPerSecond,omitempty"` - PerOperationStrategies []*OperationSamplingStrategy `protobuf:"bytes,3,rep,name=perOperationStrategies" json:"perOperationStrategies,omitempty"` + PerOperationStrategies []*OperationSamplingStrategy `protobuf:"bytes,3,rep,name=perOperationStrategies,proto3" json:"perOperationStrategies,omitempty"` 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 fileDescriptorApiV2, []int{5} + return fileDescriptor_80fcbf09c149c4e3, []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.MarshalTo(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 { @@ -196,15 +276,46 @@ func (m *PerOperationSamplingStrategies) GetDefaultUpperBoundTracesPerSecond() f type SamplingStrategyResponse struct { 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" json:"probabilisticSampling,omitempty"` - RateLimitingSampling *RateLimitingSamplingStrategy `protobuf:"bytes,3,opt,name=rateLimitingSampling" json:"rateLimitingSampling,omitempty"` - OperationSampling *PerOperationSamplingStrategies `protobuf:"bytes,4,opt,name=operationSampling" json:"operationSampling,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_80fcbf09c149c4e3, []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.MarshalTo(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) } -func (m *SamplingStrategyResponse) Reset() { *m = SamplingStrategyResponse{} } -func (m *SamplingStrategyResponse) String() string { return proto.CompactTextString(m) } -func (*SamplingStrategyResponse) ProtoMessage() {} -func (*SamplingStrategyResponse) Descriptor() ([]byte, []int) { return fileDescriptorApiV2, []int{6} } +var xxx_messageInfo_SamplingStrategyResponse proto.InternalMessageInfo func (m *SamplingStrategyResponse) GetStrategyType() SamplingStrategyType { if m != nil { @@ -235,13 +346,44 @@ func (m *SamplingStrategyResponse) GetOperationSampling() *PerOperationSamplingS } type SamplingStrategyParameters struct { - ServiceName string `protobuf:"bytes,1,opt,name=serviceName,proto3" json:"serviceName,omitempty"` + 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_80fcbf09c149c4e3, []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.MarshalTo(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) } -func (m *SamplingStrategyParameters) Reset() { *m = SamplingStrategyParameters{} } -func (m *SamplingStrategyParameters) String() string { return proto.CompactTextString(m) } -func (*SamplingStrategyParameters) ProtoMessage() {} -func (*SamplingStrategyParameters) Descriptor() ([]byte, []int) { return fileDescriptorApiV2, []int{7} } +var xxx_messageInfo_SamplingStrategyParameters proto.InternalMessageInfo func (m *SamplingStrategyParameters) GetServiceName() string { if m != nil { @@ -251,10 +393,8 @@ func (m *SamplingStrategyParameters) GetServiceName() string { } func init() { - proto.RegisterType((*PostSpansRequest)(nil), "jaeger.api_v2.PostSpansRequest") - golang_proto.RegisterType((*PostSpansRequest)(nil), "jaeger.api_v2.PostSpansRequest") - proto.RegisterType((*PostSpansResponse)(nil), "jaeger.api_v2.PostSpansResponse") - golang_proto.RegisterType((*PostSpansResponse)(nil), "jaeger.api_v2.PostSpansResponse") + proto.RegisterEnum("jaeger.api_v2.SamplingStrategyType", SamplingStrategyType_name, SamplingStrategyType_value) + golang_proto.RegisterEnum("jaeger.api_v2.SamplingStrategyType", SamplingStrategyType_name, SamplingStrategyType_value) proto.RegisterType((*ProbabilisticSamplingStrategy)(nil), "jaeger.api_v2.ProbabilisticSamplingStrategy") golang_proto.RegisterType((*ProbabilisticSamplingStrategy)(nil), "jaeger.api_v2.ProbabilisticSamplingStrategy") proto.RegisterType((*RateLimitingSamplingStrategy)(nil), "jaeger.api_v2.RateLimitingSamplingStrategy") @@ -267,8 +407,53 @@ func init() { golang_proto.RegisterType((*SamplingStrategyResponse)(nil), "jaeger.api_v2.SamplingStrategyResponse") proto.RegisterType((*SamplingStrategyParameters)(nil), "jaeger.api_v2.SamplingStrategyParameters") golang_proto.RegisterType((*SamplingStrategyParameters)(nil), "jaeger.api_v2.SamplingStrategyParameters") - proto.RegisterEnum("jaeger.api_v2.SamplingStrategyType", SamplingStrategyType_name, SamplingStrategyType_value) - golang_proto.RegisterEnum("jaeger.api_v2.SamplingStrategyType", SamplingStrategyType_name, SamplingStrategyType_value) +} + +func init() { proto.RegisterFile("api_v2/sampling.proto", fileDescriptor_80fcbf09c149c4e3) } +func init() { golang_proto.RegisterFile("api_v2/sampling.proto", fileDescriptor_80fcbf09c149c4e3) } + +var fileDescriptor_80fcbf09c149c4e3 = []byte{ + // 639 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0xcf, 0x4f, 0x13, 0x41, + 0x14, 0x76, 0x5a, 0x21, 0xe1, 0x15, 0x14, 0x46, 0xd0, 0xda, 0x40, 0xd3, 0x2c, 0x07, 0x2a, 0xc2, + 0xae, 0xae, 0xf1, 0x42, 0x0c, 0x49, 0x4b, 0x0c, 0x59, 0x52, 0xa0, 0xd9, 0xd6, 0x8b, 0x1e, 0x70, + 0xba, 0x8c, 0xc3, 0x98, 0x76, 0x67, 0x32, 0x3b, 0x80, 0x5c, 0x4d, 0xbc, 0x7a, 0xd0, 0xb3, 0x17, + 0xff, 0x12, 0x8f, 0x1e, 0x4d, 0xbc, 0x79, 0x32, 0xe8, 0x1f, 0x62, 0x3a, 0xdd, 0x42, 0xbb, 0xfd, + 0x75, 0xf3, 0x34, 0xbb, 0xef, 0x7d, 0xef, 0x7b, 0xdf, 0x7b, 0xf3, 0xe6, 0xc1, 0x12, 0x91, 0xfc, + 0xe8, 0xcc, 0x75, 0x22, 0xd2, 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, 0x78, 0x1b, 0x72, + 0xc7, 0xf4, 0x0d, 0x39, 0x6d, 0xea, 0xae, 0xf3, 0x2a, 0x93, 0xbe, 0x88, 0x9b, 0x38, 0x06, 0x81, + 0xf7, 0xa0, 0x10, 0x7b, 0x2b, 0xe2, 0x9c, 0xaa, 0xb2, 0x38, 0x0d, 0x8f, 0x93, 0x0d, 0x4c, 0x19, + 0x96, 0x89, 0x38, 0xfc, 0x1a, 0xee, 0xca, 0x5e, 0xb5, 0x57, 0x2a, 0xb3, 0xe9, 0x42, 0xba, 0x98, + 0x71, 0x8b, 0x89, 0x9e, 0x8c, 0x6c, 0xbd, 0x3f, 0x82, 0xa7, 0x47, 0xed, 0x0b, 0x29, 0x47, 0xa8, + 0xbd, 0xd9, 0xa7, 0x76, 0x24, 0xce, 0xfa, 0x90, 0x86, 0xec, 0x40, 0x62, 0x1a, 0x49, 0x11, 0x46, + 0x14, 0xef, 0xc2, 0x6c, 0x14, 0xdb, 0xea, 0x17, 0xb2, 0x33, 0x8d, 0xb7, 0xdc, 0xd5, 0x44, 0x01, + 0xc9, 0xf0, 0x36, 0xd4, 0xef, 0x0b, 0xfc, 0x1f, 0x63, 0x82, 0x8f, 0x60, 0x51, 0x0d, 0x79, 0x16, + 0xd9, 0xb4, 0x49, 0xf1, 0x30, 0x91, 0x62, 0xdc, 0x0b, 0xf2, 0x87, 0x12, 0xe1, 0x57, 0xb0, 0x20, + 0x92, 0x77, 0x65, 0xfa, 0x9c, 0x71, 0x37, 0x93, 0x05, 0x8c, 0x1d, 0x57, 0x7f, 0x90, 0xc7, 0xda, + 0x86, 0x5c, 0x52, 0x46, 0x95, 0x28, 0xd2, 0xa2, 0x9a, 0xaa, 0x08, 0x17, 0x20, 0x13, 0x51, 0x75, + 0xc6, 0x03, 0x7a, 0x40, 0x5a, 0x34, 0x7e, 0x86, 0xbd, 0xa6, 0xf5, 0x67, 0xb0, 0x38, 0xec, 0x1e, + 0xf0, 0x02, 0xcc, 0x55, 0xfd, 0xc3, 0x72, 0xa9, 0xec, 0x55, 0xbc, 0x5a, 0xdd, 0xdb, 0x99, 0xbf, + 0xd1, 0x36, 0xf9, 0xa5, 0xfa, 0xf3, 0xa3, 0x8a, 0xb7, 0xef, 0xd5, 0xbd, 0x83, 0xdd, 0x79, 0xe4, + 0x7e, 0x45, 0x70, 0xbb, 0x1b, 0xbe, 0x4f, 0x42, 0xc2, 0xa8, 0xc2, 0x1f, 0x11, 0xdc, 0xd9, 0xa5, + 0x7a, 0x60, 0x21, 0x3c, 0x98, 0x70, 0xfd, 0xd7, 0xb2, 0x73, 0x6b, 0x13, 0xa0, 0xdd, 0x41, 0xb3, + 0x56, 0xdf, 0xff, 0xfc, 0xfb, 0x39, 0xb5, 0x62, 0x65, 0xcd, 0x96, 0xed, 0x59, 0xd4, 0x5d, 0xe4, + 0x16, 0x5a, 0x2f, 0x9f, 0x7d, 0x2a, 0x95, 0xf1, 0x94, 0x9b, 0x7e, 0x6c, 0x3f, 0x5a, 0x4f, 0xa1, + 0x94, 0x7a, 0x0a, 0xb0, 0x67, 0xe8, 0x0b, 0xa5, 0xaa, 0x87, 0xd7, 0x4e, 0xb4, 0x96, 0xd1, 0x96, + 0xe3, 0x30, 0xae, 0x4f, 0x4e, 0x1b, 0x76, 0x20, 0x5a, 0x4e, 0x27, 0xbb, 0x56, 0x24, 0xe0, 0x21, + 0x8b, 0xff, 0xbe, 0x5f, 0xe6, 0xd1, 0x8f, 0xcb, 0x3c, 0xfa, 0x7d, 0x99, 0x47, 0xdf, 0xfe, 0xe4, + 0x11, 0xdc, 0xe3, 0xc2, 0xee, 0x03, 0xc6, 0x6a, 0x5f, 0x4e, 0x77, 0xce, 0xc6, 0xb4, 0xd9, 0xdd, + 0x4f, 0xfe, 0x05, 0x00, 0x00, 0xff, 0xff, 0x72, 0x2d, 0x65, 0xb7, 0x45, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -279,72 +464,9 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// Client API for CollectorService service - -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 := grpc.Invoke(ctx, "/jaeger.api_v2.CollectorService/PostSpans", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Server API for CollectorService service - -type CollectorServiceServer interface { - PostSpans(context.Context, *PostSpansRequest) (*PostSpansResponse, error) -} - -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: "api_v2.proto", -} - -// Client API for SamplingManager service - +// 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) } @@ -359,15 +481,14 @@ func NewSamplingManagerClient(cc *grpc.ClientConn) SamplingManagerClient { func (c *samplingManagerClient) GetSamplingStrategy(ctx context.Context, in *SamplingStrategyParameters, opts ...grpc.CallOption) (*SamplingStrategyResponse, error) { out := new(SamplingStrategyResponse) - err := grpc.Invoke(ctx, "/jaeger.api_v2.SamplingManager/GetSamplingStrategy", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/jaeger.api_v2.SamplingManager/GetSamplingStrategy", in, out, opts...) if err != nil { return nil, err } return out, nil } -// Server API for SamplingManager service - +// SamplingManagerServer is the server API for SamplingManager service. type SamplingManagerServer interface { GetSamplingStrategy(context.Context, *SamplingStrategyParameters) (*SamplingStrategyResponse, error) } @@ -404,51 +525,7 @@ var _SamplingManager_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "api_v2.proto", -} - -func (m *PostSpansRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PostSpansRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintApiV2(dAtA, i, uint64(m.Batch.Size())) - n1, err := m.Batch.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - return i, nil -} - -func (m *PostSpansResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PostSpansResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - return i, nil + Metadata: "api_v2/sampling.proto", } func (m *ProbabilisticSamplingStrategy) Marshal() (dAtA []byte, err error) { @@ -469,9 +546,12 @@ func (m *ProbabilisticSamplingStrategy) MarshalTo(dAtA []byte) (int, error) { if m.SamplingRate != 0 { dAtA[i] = 0x9 i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.SamplingRate)))) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.SamplingRate)))) i += 8 } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -493,7 +573,10 @@ func (m *RateLimitingSamplingStrategy) MarshalTo(dAtA []byte) (int, error) { if m.MaxTracesPerSecond != 0 { dAtA[i] = 0x8 i++ - i = encodeVarintApiV2(dAtA, i, uint64(m.MaxTracesPerSecond)) + i = encodeVarintSampling(dAtA, i, uint64(m.MaxTracesPerSecond)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } @@ -516,18 +599,21 @@ func (m *OperationSamplingStrategy) MarshalTo(dAtA []byte) (int, error) { if len(m.Operation) > 0 { dAtA[i] = 0xa i++ - i = encodeVarintApiV2(dAtA, i, uint64(len(m.Operation))) + i = encodeVarintSampling(dAtA, i, uint64(len(m.Operation))) i += copy(dAtA[i:], m.Operation) } if m.ProbabilisticSampling != nil { dAtA[i] = 0x12 i++ - i = encodeVarintApiV2(dAtA, i, uint64(m.ProbabilisticSampling.Size())) - n2, err := m.ProbabilisticSampling.MarshalTo(dAtA[i:]) + i = encodeVarintSampling(dAtA, i, uint64(m.ProbabilisticSampling.Size())) + n1, err := m.ProbabilisticSampling.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n2 + i += n1 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } @@ -550,20 +636,20 @@ func (m *PerOperationSamplingStrategies) MarshalTo(dAtA []byte) (int, error) { if m.DefaultSamplingProbability != 0 { dAtA[i] = 0x9 i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.DefaultSamplingProbability)))) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.DefaultSamplingProbability)))) i += 8 } if m.DefaultLowerBoundTracesPerSecond != 0 { dAtA[i] = 0x11 i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.DefaultLowerBoundTracesPerSecond)))) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.DefaultLowerBoundTracesPerSecond)))) i += 8 } if len(m.PerOperationStrategies) > 0 { for _, msg := range m.PerOperationStrategies { dAtA[i] = 0x1a i++ - i = encodeVarintApiV2(dAtA, i, uint64(msg.Size())) + i = encodeVarintSampling(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err @@ -574,9 +660,12 @@ func (m *PerOperationSamplingStrategies) MarshalTo(dAtA []byte) (int, error) { if m.DefaultUpperBoundTracesPerSecond != 0 { dAtA[i] = 0x21 i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.DefaultUpperBoundTracesPerSecond)))) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.DefaultUpperBoundTracesPerSecond)))) i += 8 } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -598,37 +687,40 @@ func (m *SamplingStrategyResponse) MarshalTo(dAtA []byte) (int, error) { if m.StrategyType != 0 { dAtA[i] = 0x8 i++ - i = encodeVarintApiV2(dAtA, i, uint64(m.StrategyType)) + i = encodeVarintSampling(dAtA, i, uint64(m.StrategyType)) } if m.ProbabilisticSampling != nil { dAtA[i] = 0x12 i++ - i = encodeVarintApiV2(dAtA, i, uint64(m.ProbabilisticSampling.Size())) - n3, err := m.ProbabilisticSampling.MarshalTo(dAtA[i:]) + i = encodeVarintSampling(dAtA, i, uint64(m.ProbabilisticSampling.Size())) + n2, err := m.ProbabilisticSampling.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n3 + i += n2 } if m.RateLimitingSampling != nil { dAtA[i] = 0x1a i++ - i = encodeVarintApiV2(dAtA, i, uint64(m.RateLimitingSampling.Size())) - n4, err := m.RateLimitingSampling.MarshalTo(dAtA[i:]) + i = encodeVarintSampling(dAtA, i, uint64(m.RateLimitingSampling.Size())) + n3, err := m.RateLimitingSampling.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n4 + i += n3 } if m.OperationSampling != nil { dAtA[i] = 0x22 i++ - i = encodeVarintApiV2(dAtA, i, uint64(m.OperationSampling.Size())) - n5, err := m.OperationSampling.MarshalTo(dAtA[i:]) + i = encodeVarintSampling(dAtA, i, uint64(m.OperationSampling.Size())) + n4, err := m.OperationSampling.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n5 + i += n4 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } @@ -651,13 +743,16 @@ func (m *SamplingStrategyParameters) MarshalTo(dAtA []byte) (int, error) { if len(m.ServiceName) > 0 { dAtA[i] = 0xa i++ - i = encodeVarintApiV2(dAtA, i, uint64(len(m.ServiceName))) + i = encodeVarintSampling(dAtA, i, uint64(len(m.ServiceName))) i += copy(dAtA[i:], m.ServiceName) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } -func encodeVarintApiV2(dAtA []byte, offset int, v uint64) int { +func encodeVarintSampling(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 @@ -666,53 +761,60 @@ func encodeVarintApiV2(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return offset + 1 } -func (m *PostSpansRequest) Size() (n int) { - var l int - _ = l - l = m.Batch.Size() - n += 1 + l + sovApiV2(uint64(l)) - return n -} - -func (m *PostSpansResponse) Size() (n int) { - var l int - _ = l - return n -} - 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 + sovApiV2(uint64(m.MaxTracesPerSecond)) + 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 + sovApiV2(uint64(l)) + n += 1 + l + sovSampling(uint64(l)) } if m.ProbabilisticSampling != nil { l = m.ProbabilisticSampling.Size() - n += 1 + l + sovApiV2(uint64(l)) + 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 { @@ -724,47 +826,62 @@ func (m *PerOperationSamplingStrategies) Size() (n int) { if len(m.PerOperationStrategies) > 0 { for _, e := range m.PerOperationStrategies { l = e.Size() - n += 1 + l + sovApiV2(uint64(l)) + 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 + sovApiV2(uint64(m.StrategyType)) + n += 1 + sovSampling(uint64(m.StrategyType)) } if m.ProbabilisticSampling != nil { l = m.ProbabilisticSampling.Size() - n += 1 + l + sovApiV2(uint64(l)) + n += 1 + l + sovSampling(uint64(l)) } if m.RateLimitingSampling != nil { l = m.RateLimitingSampling.Size() - n += 1 + l + sovApiV2(uint64(l)) + n += 1 + l + sovSampling(uint64(l)) } if m.OperationSampling != nil { l = m.OperationSampling.Size() - n += 1 + l + sovApiV2(uint64(l)) + 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 + sovApiV2(uint64(l)) + n += 1 + l + sovSampling(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } return n } -func sovApiV2(x uint64) (n int) { +func sovSampling(x uint64) (n int) { for { n++ x >>= 7 @@ -774,138 +891,8 @@ func sovApiV2(x uint64) (n int) { } return n } -func sozApiV2(x uint64) (n int) { - return sovApiV2(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 ErrIntOverflowApiV2 - } - 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 ErrIntOverflowApiV2 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApiV2 - } - postIndex := iNdEx + msglen - 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 := skipApiV2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthApiV2 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - 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 ErrIntOverflowApiV2 - } - 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 := skipApiV2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthApiV2 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil +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) @@ -915,14 +902,14 @@ func (m *ProbabilisticSamplingStrategy) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowApiV2 + return ErrIntOverflowSampling } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -944,21 +931,25 @@ func (m *ProbabilisticSamplingStrategy) Unmarshal(dAtA []byte) error { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.SamplingRate = float64(math.Float64frombits(v)) default: iNdEx = preIndex - skippy, err := skipApiV2(dAtA[iNdEx:]) + skippy, err := skipSampling(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthApiV2 + return ErrInvalidLengthSampling + } + if (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 } } @@ -976,14 +967,14 @@ func (m *RateLimitingSamplingStrategy) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowApiV2 + return ErrIntOverflowSampling } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1004,30 +995,34 @@ func (m *RateLimitingSamplingStrategy) Unmarshal(dAtA []byte) error { m.MaxTracesPerSecond = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowApiV2 + return ErrIntOverflowSampling } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - m.MaxTracesPerSecond |= (int32(b) & 0x7F) << shift + m.MaxTracesPerSecond |= int32(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex - skippy, err := skipApiV2(dAtA[iNdEx:]) + skippy, err := skipSampling(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthApiV2 + return ErrInvalidLengthSampling + } + if (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 } } @@ -1045,14 +1040,14 @@ func (m *OperationSamplingStrategy) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowApiV2 + return ErrIntOverflowSampling } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1073,23 +1068,26 @@ func (m *OperationSamplingStrategy) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowApiV2 + return ErrIntOverflowSampling } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthApiV2 + return ErrInvalidLengthSampling } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSampling + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1102,22 +1100,25 @@ func (m *OperationSamplingStrategy) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowApiV2 + return ErrIntOverflowSampling } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { - return ErrInvalidLengthApiV2 + return ErrInvalidLengthSampling } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSampling + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1130,16 +1131,20 @@ func (m *OperationSamplingStrategy) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipApiV2(dAtA[iNdEx:]) + skippy, err := skipSampling(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthApiV2 + return ErrInvalidLengthSampling + } + if (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 } } @@ -1157,14 +1162,14 @@ func (m *PerOperationSamplingStrategies) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowApiV2 + return ErrIntOverflowSampling } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1186,7 +1191,7 @@ func (m *PerOperationSamplingStrategies) Unmarshal(dAtA []byte) error { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.DefaultSamplingProbability = float64(math.Float64frombits(v)) case 2: @@ -1197,7 +1202,7 @@ func (m *PerOperationSamplingStrategies) Unmarshal(dAtA []byte) error { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.DefaultLowerBoundTracesPerSecond = float64(math.Float64frombits(v)) case 3: @@ -1207,22 +1212,25 @@ func (m *PerOperationSamplingStrategies) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowApiV2 + return ErrIntOverflowSampling } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { - return ErrInvalidLengthApiV2 + return ErrInvalidLengthSampling } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSampling + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1239,21 +1247,25 @@ func (m *PerOperationSamplingStrategies) Unmarshal(dAtA []byte) error { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.DefaultUpperBoundTracesPerSecond = float64(math.Float64frombits(v)) default: iNdEx = preIndex - skippy, err := skipApiV2(dAtA[iNdEx:]) + skippy, err := skipSampling(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthApiV2 + return ErrInvalidLengthSampling + } + if (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 } } @@ -1271,14 +1283,14 @@ func (m *SamplingStrategyResponse) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowApiV2 + return ErrIntOverflowSampling } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1299,14 +1311,14 @@ func (m *SamplingStrategyResponse) Unmarshal(dAtA []byte) error { m.StrategyType = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowApiV2 + return ErrIntOverflowSampling } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - m.StrategyType |= (SamplingStrategyType(b) & 0x7F) << shift + m.StrategyType |= SamplingStrategyType(b&0x7F) << shift if b < 0x80 { break } @@ -1318,22 +1330,25 @@ func (m *SamplingStrategyResponse) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowApiV2 + return ErrIntOverflowSampling } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { - return ErrInvalidLengthApiV2 + return ErrInvalidLengthSampling } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSampling + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1351,22 +1366,25 @@ func (m *SamplingStrategyResponse) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowApiV2 + return ErrIntOverflowSampling } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { - return ErrInvalidLengthApiV2 + return ErrInvalidLengthSampling } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSampling + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1384,22 +1402,25 @@ func (m *SamplingStrategyResponse) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowApiV2 + return ErrIntOverflowSampling } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { - return ErrInvalidLengthApiV2 + return ErrInvalidLengthSampling } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSampling + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1412,16 +1433,20 @@ func (m *SamplingStrategyResponse) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipApiV2(dAtA[iNdEx:]) + skippy, err := skipSampling(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthApiV2 + return ErrInvalidLengthSampling + } + if (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 } } @@ -1439,14 +1464,14 @@ func (m *SamplingStrategyParameters) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowApiV2 + return ErrIntOverflowSampling } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1467,23 +1492,26 @@ func (m *SamplingStrategyParameters) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowApiV2 + return ErrIntOverflowSampling } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthApiV2 + return ErrInvalidLengthSampling } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSampling + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1491,16 +1519,20 @@ func (m *SamplingStrategyParameters) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipApiV2(dAtA[iNdEx:]) + skippy, err := skipSampling(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthApiV2 + return ErrInvalidLengthSampling + } + if (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 } } @@ -1510,14 +1542,14 @@ func (m *SamplingStrategyParameters) Unmarshal(dAtA []byte) error { } return nil } -func skipApiV2(dAtA []byte) (n int, err error) { +func skipSampling(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowApiV2 + return 0, ErrIntOverflowSampling } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -1534,7 +1566,7 @@ func skipApiV2(dAtA []byte) (n int, err error) { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowApiV2 + return 0, ErrIntOverflowSampling } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -1552,7 +1584,7 @@ func skipApiV2(dAtA []byte) (n int, err error) { var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowApiV2 + return 0, ErrIntOverflowSampling } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -1564,9 +1596,12 @@ func skipApiV2(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { - return 0, ErrInvalidLengthApiV2 + return 0, ErrInvalidLengthSampling + } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthSampling } return iNdEx, nil case 3: @@ -1575,7 +1610,7 @@ func skipApiV2(dAtA []byte) (n int, err error) { var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowApiV2 + return 0, ErrIntOverflowSampling } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -1591,11 +1626,14 @@ func skipApiV2(dAtA []byte) (n int, err error) { if innerWireType == 4 { break } - next, err := skipApiV2(dAtA[start:]) + next, err := skipSampling(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthSampling + } } return iNdEx, nil case 4: @@ -1611,59 +1649,6 @@ func skipApiV2(dAtA []byte) (n int, err error) { } var ( - ErrInvalidLengthApiV2 = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowApiV2 = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthSampling = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSampling = fmt.Errorf("proto: integer overflow") ) - -func init() { proto.RegisterFile("api_v2.proto", fileDescriptorApiV2) } -func init() { golang_proto.RegisterFile("api_v2.proto", fileDescriptorApiV2) } - -var fileDescriptorApiV2 = []byte{ - // 733 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcf, 0x4f, 0x13, 0x41, - 0x14, 0x66, 0x5b, 0x20, 0xe1, 0x15, 0xb4, 0x0c, 0x55, 0x6b, 0x03, 0xa5, 0x59, 0x0e, 0x60, 0x85, - 0x5d, 0x5c, 0xe3, 0x85, 0x18, 0x92, 0x16, 0x0d, 0x29, 0x29, 0xd0, 0x6c, 0xeb, 0x45, 0x0f, 0x38, - 0xdd, 0x8e, 0xdb, 0x35, 0xed, 0xce, 0x38, 0x33, 0x2d, 0x92, 0x78, 0x32, 0xf1, 0xea, 0x41, 0xcf, - 0x5e, 0xfc, 0x4b, 0x3c, 0x72, 0x34, 0xf1, 0xe6, 0xc1, 0x18, 0xf4, 0x0f, 0x31, 0x9d, 0x2e, 0xa5, - 0xdd, 0xfe, 0xe0, 0xe6, 0x69, 0xb7, 0xef, 0x7d, 0xf3, 0xbd, 0xef, 0x7d, 0xfb, 0xe6, 0x15, 0xe6,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xa3, 0x19, 0x2b, 0xfa, 0xc0, 0xd8, 0xce, 0x46, 0xb4, 0x08, 0x7f, 0x04, - 0x70, 0xa0, 0xe8, 0x33, 0xb9, 0x52, 0x01, 0xad, 0xd7, 0xa5, 0x64, 0x62, 0xc7, 0x34, 0x5d, 0x4f, - 0xd6, 0x5b, 0x55, 0xc3, 0xa1, 0x4d, 0xb3, 0x5b, 0x5d, 0x72, 0xec, 0x78, 0xbe, 0x1b, 0xfc, 0x3a, - 0xbf, 0x48, 0x6b, 0xdf, 0x2f, 0xd2, 0xda, 0xef, 0x8b, 0xb4, 0xf6, 0xed, 0x4f, 0x5a, 0x83, 0x3b, - 0x1e, 0x35, 0x06, 0x80, 0x81, 0xda, 0xe7, 0xb3, 0xdd, 0x67, 0x75, 0x56, 0xfd, 0x29, 0x3d, 0xfc, - 0x17, 0x00, 0x00, 0xff, 0xff, 0x6c, 0xba, 0x05, 0x5d, 0x22, 0x07, 0x00, 0x00, -} diff --git a/proto-gen/api_v2/api_v2.pb.gw.go b/proto-gen/api_v2/sampling.pb.gw.go similarity index 54% rename from proto-gen/api_v2/api_v2.pb.gw.go rename to proto-gen/api_v2/sampling.pb.gw.go index a9621ecda40..48249f3cef9 100644 --- a/proto-gen/api_v2/api_v2.pb.gw.go +++ b/proto-gen/api_v2/sampling.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: api_v2.proto +// source: api_v2/sampling.proto /* Package api_v2 is a reverse proxy. @@ -28,23 +28,6 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray -func request_CollectorService_PostSpans_0(ctx context.Context, marshaler runtime.Marshaler, client CollectorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PostSpansRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.PostSpans(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - func request_SamplingManager_GetSamplingStrategy_0(ctx context.Context, marshaler runtime.Marshaler, client SamplingManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq SamplingStrategyParameters var metadata runtime.ServerMetadata @@ -62,75 +45,6 @@ func request_SamplingManager_GetSamplingStrategy_0(ctx context.Context, marshale } -// RegisterCollectorServiceHandlerFromEndpoint is same as RegisterCollectorServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterCollectorServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterCollectorServiceHandler(ctx, mux, conn) -} - -// RegisterCollectorServiceHandler registers the http handlers for service CollectorService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterCollectorServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterCollectorServiceHandlerClient(ctx, mux, NewCollectorServiceClient(conn)) -} - -// RegisterCollectorServiceHandlerClient registers the http handlers for service CollectorService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CollectorServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CollectorServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "CollectorServiceClient" to call the correct interceptors. -func RegisterCollectorServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CollectorServiceClient) error { - - mux.Handle("POST", pattern_CollectorService_PostSpans_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CollectorService_PostSpans_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_CollectorService_PostSpans_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_CollectorService_PostSpans_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "spans"}, "")) -) - -var ( - forward_CollectorService_PostSpans_0 = runtime.ForwardResponseMessage -) - // RegisterSamplingManagerHandlerFromEndpoint is same as RegisterSamplingManagerHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterSamplingManagerHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { diff --git a/proto-gen/openapi/api_v2.swagger.json b/proto-gen/openapi/api_v2.swagger.json index 468e1ceca96..907013b8659 100644 --- a/proto-gen/openapi/api_v2.swagger.json +++ b/proto-gen/openapi/api_v2.swagger.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "title": "api_v2.proto", + "title": "api_v2/collector.proto", "version": "1.0" }, "schemes": [