pb

package
v0.0.0-...-f4cebfc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package pb is a generated protocol buffer package.

It is generated from these files:
	pb/agent.proto
	pb/span.proto

It has these top-level messages:
	TracingReqResp
	Trace
	Span
	TraceID
	SpanRef
	KeyValue
	Log
	Process
	DependencyLink

Package pb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthAgent = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAgent   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthSpan = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSpan   = fmt.Errorf("proto: integer overflow")
)
View Source
var SpanRefType_name = map[int32]string{
	0: "ChildOf",
	1: "FollowsFrom",
}
View Source
var SpanRefType_value = map[string]int32{
	"ChildOf":     0,
	"FollowsFrom": 1,
}
View Source
var ValueType_name = map[int32]string{
	0: "StringType",
	1: "BoolType",
	2: "Int64Type",
	3: "Float64Type",
	4: "BinaryType",
}
View Source
var ValueType_value = map[string]int32{
	"StringType":  0,
	"BoolType":    1,
	"Int64Type":   2,
	"Float64Type": 3,
	"BinaryType":  4,
}

Functions

func RegisterTracingAgentServiceHandler

func RegisterTracingAgentServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterTracingAgentServiceHandler registers the http handlers for service TracingAgentService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterTracingAgentServiceHandlerFromEndpoint

func RegisterTracingAgentServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterTracingAgentServiceHandlerFromEndpoint is same as RegisterTracingAgentServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterTracingAgentServiceServer

func RegisterTracingAgentServiceServer(s *grpc.Server, srv TracingAgentServiceServer)

Types

type DependencyLink struct {
	Parent    string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	Child     string `protobuf:"bytes,2,opt,name=child,proto3" json:"child,omitempty"`
	CallCount uint64 `protobuf:"varint,3,opt,name=call_count,json=callCount,proto3" json:"call_count,omitempty"`
}

DependencyLink shows dependencies between services

func (*DependencyLink) Descriptor

func (*DependencyLink) Descriptor() ([]byte, []int)

func (*DependencyLink) GetCallCount

func (m *DependencyLink) GetCallCount() uint64

func (*DependencyLink) GetChild

func (m *DependencyLink) GetChild() string

func (*DependencyLink) GetParent

func (m *DependencyLink) GetParent() string

func (*DependencyLink) Marshal

func (m *DependencyLink) Marshal() (dAtA []byte, err error)

func (*DependencyLink) MarshalTo

func (m *DependencyLink) MarshalTo(dAtA []byte) (int, error)

func (*DependencyLink) ProtoMessage

func (*DependencyLink) ProtoMessage()

func (*DependencyLink) Reset

func (m *DependencyLink) Reset()

func (*DependencyLink) Size

func (m *DependencyLink) Size() (n int)

func (*DependencyLink) String

func (m *DependencyLink) String() string

func (*DependencyLink) Unmarshal

func (m *DependencyLink) Unmarshal(dAtA []byte) error

type KeyValue

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=pb.ValueType" json:"v_type,omitempty"`
	VStr  string    `protobuf:"bytes,3,opt,name=v_str,json=vStr,proto3" json:"v_str,omitempty"`
	VNum  int64     `protobuf:"varint,4,opt,name=v_num,json=vNum,proto3" json:"v_num,omitempty"`
	VBlob []byte    `protobuf:"bytes,5,opt,name=v_blob,json=vBlob,proto3" json:"v_blob,omitempty"`
}

KeyValue describes a tag or a log field that consists of a key and a typed value. Before accessing a value, the caller must check the type. Boolean and numeric values should be accessed via accessor methods Bool(), Int64(), and Float64().

This struct is designed to minimize heap allocations.

func (*KeyValue) Descriptor

func (*KeyValue) Descriptor() ([]byte, []int)

func (*KeyValue) GetKey

func (m *KeyValue) GetKey() string

func (*KeyValue) GetVBlob

func (m *KeyValue) GetVBlob() []byte

func (*KeyValue) GetVNum

func (m *KeyValue) GetVNum() int64

func (*KeyValue) GetVStr

func (m *KeyValue) GetVStr() string

func (*KeyValue) GetVType

func (m *KeyValue) GetVType() ValueType

func (*KeyValue) Marshal

func (m *KeyValue) Marshal() (dAtA []byte, err error)

func (*KeyValue) MarshalTo

func (m *KeyValue) MarshalTo(dAtA []byte) (int, error)

func (*KeyValue) ProtoMessage

func (*KeyValue) ProtoMessage()

func (*KeyValue) Reset

func (m *KeyValue) Reset()

func (*KeyValue) Size

func (m *KeyValue) Size() (n int)

func (*KeyValue) String

func (m *KeyValue) String() string

func (*KeyValue) Unmarshal

func (m *KeyValue) Unmarshal(dAtA []byte) error

type Log

type Log struct {
	// google.protobuf.Timestamp timestamp = 1;
	Timestamp int64       `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Fields    []*KeyValue `protobuf:"bytes,2,rep,name=fields" json:"fields,omitempty"`
}

Log describes a micro-log entry that consists of a timestamp and one or more key-value fields

func (*Log) Descriptor

func (*Log) Descriptor() ([]byte, []int)

func (*Log) GetFields

func (m *Log) GetFields() []*KeyValue

func (*Log) GetTimestamp

func (m *Log) GetTimestamp() int64

func (*Log) Marshal

func (m *Log) Marshal() (dAtA []byte, err error)

func (*Log) MarshalTo

func (m *Log) MarshalTo(dAtA []byte) (int, error)

func (*Log) ProtoMessage

func (*Log) ProtoMessage()

func (*Log) Reset

func (m *Log) Reset()

func (*Log) Size

func (m *Log) Size() (n int)

func (*Log) String

func (m *Log) String() string

func (*Log) Unmarshal

func (m *Log) Unmarshal(dAtA []byte) error

type Process

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,omitempty"`
}

Process describes an instance of an application or service that emits tracing data.

func (*Process) Descriptor

func (*Process) Descriptor() ([]byte, []int)

func (*Process) GetServiceName

func (m *Process) GetServiceName() string

func (*Process) GetTags

func (m *Process) GetTags() []*KeyValue

func (*Process) Marshal

func (m *Process) Marshal() (dAtA []byte, err error)

func (*Process) MarshalTo

func (m *Process) MarshalTo(dAtA []byte) (int, error)

func (*Process) ProtoMessage

func (*Process) ProtoMessage()

func (*Process) Reset

func (m *Process) Reset()

func (*Process) Size

func (m *Process) Size() (n int)

func (*Process) String

func (m *Process) String() string

func (*Process) Unmarshal

func (m *Process) Unmarshal(dAtA []byte) error

type Span

type Span struct {
	TraceId      *TraceID   `protobuf:"bytes,1,opt,name=trace_id,json=traceId" json:"trace_id,omitempty"`
	SpanId       uint64     `protobuf:"varint,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"`
	ParentSpanId uint64     `protobuf:"varint,3,opt,name=parent_span_id,json=parentSpanId,proto3" json:"parent_span_id,omitempty"`
	References   []*SpanRef `protobuf:"bytes,4,rep,name=references" json:"references,omitempty"`
	Flags        uint32     `protobuf:"varint,5,opt,name=flags,proto3" json:"flags,omitempty"`
	// google.protobuf.Timestamp start_time = 6;
	StartTime int64       `protobuf:"varint,6,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	Duration  int64       `protobuf:"varint,7,opt,name=duration,proto3" json:"duration,omitempty"`
	Tags      []*KeyValue `protobuf:"bytes,8,rep,name=tags" json:"tags,omitempty"`
	Logs      []*Log      `protobuf:"bytes,9,rep,name=logs" json:"logs,omitempty"`
	Process   *Process    `protobuf:"bytes,10,opt,name=process" json:"process,omitempty"`
	Warnings  []string    `protobuf:"bytes,11,rep,name=warnings" json:"warnings,omitempty"`
}

Span represents a unit of work in an application, such as an RPC, a database call, etc.

func (*Span) Descriptor

func (*Span) Descriptor() ([]byte, []int)

func (*Span) GetDuration

func (m *Span) GetDuration() int64

func (*Span) GetFlags

func (m *Span) GetFlags() uint32

func (*Span) GetLogs

func (m *Span) GetLogs() []*Log

func (*Span) GetParentSpanId

func (m *Span) GetParentSpanId() uint64

func (*Span) GetProcess

func (m *Span) GetProcess() *Process

func (*Span) GetReferences

func (m *Span) GetReferences() []*SpanRef

func (*Span) GetSpanId

func (m *Span) GetSpanId() uint64

func (*Span) GetStartTime

func (m *Span) GetStartTime() int64

func (*Span) GetTags

func (m *Span) GetTags() []*KeyValue

func (*Span) GetTraceId

func (m *Span) GetTraceId() *TraceID

func (*Span) GetWarnings

func (m *Span) GetWarnings() []string

func (*Span) Marshal

func (m *Span) Marshal() (dAtA []byte, err error)

func (*Span) MarshalTo

func (m *Span) MarshalTo(dAtA []byte) (int, error)

func (*Span) ProtoMessage

func (*Span) ProtoMessage()

func (*Span) Reset

func (m *Span) Reset()

func (*Span) Size

func (m *Span) Size() (n int)

func (*Span) String

func (m *Span) String() string

func (*Span) Unmarshal

func (m *Span) Unmarshal(dAtA []byte) error

type SpanRef

type SpanRef struct {
	RefType SpanRefType `protobuf:"varint,1,opt,name=ref_type,json=refType,proto3,enum=pb.SpanRefType" json:"ref_type,omitempty"`
	TraceId *TraceID    `protobuf:"bytes,2,opt,name=trace_id,json=traceId" json:"trace_id,omitempty"`
	SpanId  uint64      `protobuf:"varint,3,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"`
}

SpanRef describes a reference from one span to another

func (*SpanRef) Descriptor

func (*SpanRef) Descriptor() ([]byte, []int)

func (*SpanRef) GetRefType

func (m *SpanRef) GetRefType() SpanRefType

func (*SpanRef) GetSpanId

func (m *SpanRef) GetSpanId() uint64

func (*SpanRef) GetTraceId

func (m *SpanRef) GetTraceId() *TraceID

func (*SpanRef) Marshal

func (m *SpanRef) Marshal() (dAtA []byte, err error)

func (*SpanRef) MarshalTo

func (m *SpanRef) MarshalTo(dAtA []byte) (int, error)

func (*SpanRef) ProtoMessage

func (*SpanRef) ProtoMessage()

func (*SpanRef) Reset

func (m *SpanRef) Reset()

func (*SpanRef) Size

func (m *SpanRef) Size() (n int)

func (*SpanRef) String

func (m *SpanRef) String() string

func (*SpanRef) Unmarshal

func (m *SpanRef) Unmarshal(dAtA []byte) error

type SpanRefType

type SpanRefType int32
const (
	SpanRefType_ChildOf     SpanRefType = 0
	SpanRefType_FollowsFrom SpanRefType = 1
)

func (SpanRefType) EnumDescriptor

func (SpanRefType) EnumDescriptor() ([]byte, []int)

func (SpanRefType) String

func (x SpanRefType) String() string

type Trace

type Trace struct {
	Spans    []*Span  `protobuf:"bytes,1,rep,name=spans" json:"spans,omitempty"`
	Warnings []string `protobuf:"bytes,2,rep,name=warnings" json:"warnings,omitempty"`
}

Trace is a directed acyclic graph of Spans

func (*Trace) Descriptor

func (*Trace) Descriptor() ([]byte, []int)

func (*Trace) GetSpans

func (m *Trace) GetSpans() []*Span

func (*Trace) GetWarnings

func (m *Trace) GetWarnings() []string

func (*Trace) Marshal

func (m *Trace) Marshal() (dAtA []byte, err error)

func (*Trace) MarshalTo

func (m *Trace) MarshalTo(dAtA []byte) (int, error)

func (*Trace) ProtoMessage

func (*Trace) ProtoMessage()

func (*Trace) Reset

func (m *Trace) Reset()

func (*Trace) Size

func (m *Trace) Size() (n int)

func (*Trace) String

func (m *Trace) String() string

func (*Trace) Unmarshal

func (m *Trace) Unmarshal(dAtA []byte) error

type TraceID

type TraceID struct {
	Low  uint64 `protobuf:"varint,1,opt,name=low,proto3" json:"low,omitempty"`
	High uint64 `protobuf:"varint,2,opt,name=high,proto3" json:"high,omitempty"`
}

TraceID is a random 128bit identifier for a trace

func (*TraceID) Descriptor

func (*TraceID) Descriptor() ([]byte, []int)

func (*TraceID) GetHigh

func (m *TraceID) GetHigh() uint64

func (*TraceID) GetLow

func (m *TraceID) GetLow() uint64

func (*TraceID) Marshal

func (m *TraceID) Marshal() (dAtA []byte, err error)

func (*TraceID) MarshalTo

func (m *TraceID) MarshalTo(dAtA []byte) (int, error)

func (*TraceID) ProtoMessage

func (*TraceID) ProtoMessage()

func (*TraceID) Reset

func (m *TraceID) Reset()

func (*TraceID) Size

func (m *TraceID) Size() (n int)

func (*TraceID) String

func (m *TraceID) String() string

func (*TraceID) Unmarshal

func (m *TraceID) Unmarshal(dAtA []byte) error

type TracingAgentServiceClient

type TracingAgentServiceClient interface {
	Sample(ctx context.Context, in *TracingReqResp, opts ...grpc.CallOption) (*TracingReqResp, error)
}

func NewTracingAgentServiceClient

func NewTracingAgentServiceClient(cc *grpc.ClientConn) TracingAgentServiceClient

type TracingAgentServiceServer

type TracingAgentServiceServer interface {
	Sample(context.Context, *TracingReqResp) (*TracingReqResp, error)
}

type TracingReqResp

type TracingReqResp struct {
	Span         *Span  `protobuf:"bytes,1,opt,name=span" json:"span,omitempty"`
	StateCode    int32  `protobuf:"varint,2,opt,name=state_code,json=stateCode,proto3" json:"state_code,omitempty"`
	StateMessage string `protobuf:"bytes,3,opt,name=state_message,json=stateMessage,proto3" json:"state_message,omitempty"`
}

func (*TracingReqResp) Descriptor

func (*TracingReqResp) Descriptor() ([]byte, []int)

func (*TracingReqResp) GetSpan

func (m *TracingReqResp) GetSpan() *Span

func (*TracingReqResp) GetStateCode

func (m *TracingReqResp) GetStateCode() int32

func (*TracingReqResp) GetStateMessage

func (m *TracingReqResp) GetStateMessage() string

func (*TracingReqResp) Marshal

func (m *TracingReqResp) Marshal() (dAtA []byte, err error)

func (*TracingReqResp) MarshalTo

func (m *TracingReqResp) MarshalTo(dAtA []byte) (int, error)

func (*TracingReqResp) ProtoMessage

func (*TracingReqResp) ProtoMessage()

func (*TracingReqResp) Reset

func (m *TracingReqResp) Reset()

func (*TracingReqResp) Size

func (m *TracingReqResp) Size() (n int)

func (*TracingReqResp) String

func (m *TracingReqResp) String() string

func (*TracingReqResp) Unmarshal

func (m *TracingReqResp) Unmarshal(dAtA []byte) error

type ValueType

type ValueType int32
const (
	ValueType_StringType  ValueType = 0
	ValueType_BoolType    ValueType = 1
	ValueType_Int64Type   ValueType = 2
	ValueType_Float64Type ValueType = 3
	ValueType_BinaryType  ValueType = 4
)

func (ValueType) EnumDescriptor

func (ValueType) EnumDescriptor() ([]byte, []int)

func (ValueType) String

func (x ValueType) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL