haystack

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DispatchResult_ResultCode_name = map[int32]string{
	0: "SUCCESS",
	1: "UNKNOWN_ERROR",
	2: "RATE_LIMIT_ERROR",
}
View Source
var DispatchResult_ResultCode_value = map[string]int32{
	"SUCCESS":          0,
	"UNKNOWN_ERROR":    1,
	"RATE_LIMIT_ERROR": 2,
}
View Source
var Tag_TagType_name = map[int32]string{
	0: "STRING",
	1: "DOUBLE",
	2: "BOOL",
	3: "LONG",
	4: "BINARY",
}
View Source
var Tag_TagType_value = map[string]int32{
	"STRING": 0,
	"DOUBLE": 1,
	"BOOL":   2,
	"LONG":   3,
	"BINARY": 4,
}

Functions

func RegisterSpanAgentServer

func RegisterSpanAgentServer(s *grpc.Server, srv SpanAgentServer)

Types

type Batch

type Batch struct {
	Spans                []*Span  `protobuf:"bytes,1,rep,name=spans,proto3" json:"spans,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

You can optionally use Batch to send a collection of spans. Spans may not necessarily belong to one traceId.

func (*Batch) Descriptor

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

func (*Batch) GetSpans

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

func (*Batch) ProtoMessage

func (*Batch) ProtoMessage()

func (*Batch) Reset

func (m *Batch) Reset()

func (*Batch) String

func (m *Batch) String() string

func (*Batch) XXX_DiscardUnknown

func (m *Batch) XXX_DiscardUnknown()

func (*Batch) XXX_Marshal

func (m *Batch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Batch) XXX_Merge

func (m *Batch) XXX_Merge(src proto.Message)

func (*Batch) XXX_Size

func (m *Batch) XXX_Size() int

func (*Batch) XXX_Unmarshal

func (m *Batch) XXX_Unmarshal(b []byte) error

type DispatchResult

type DispatchResult struct {
	Code                 DispatchResult_ResultCode `protobuf:"varint,1,opt,name=code,proto3,enum=DispatchResult_ResultCode" json:"code,omitempty"`
	ErrorMessage         string                    `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
	XXX_unrecognized     []byte                    `json:"-"`
	XXX_sizecache        int32                     `json:"-"`
}

func (*DispatchResult) Descriptor

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

func (*DispatchResult) GetCode

func (*DispatchResult) GetErrorMessage

func (m *DispatchResult) GetErrorMessage() string

func (*DispatchResult) ProtoMessage

func (*DispatchResult) ProtoMessage()

func (*DispatchResult) Reset

func (m *DispatchResult) Reset()

func (*DispatchResult) String

func (m *DispatchResult) String() string

func (*DispatchResult) XXX_DiscardUnknown

func (m *DispatchResult) XXX_DiscardUnknown()

func (*DispatchResult) XXX_Marshal

func (m *DispatchResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DispatchResult) XXX_Merge

func (m *DispatchResult) XXX_Merge(src proto.Message)

func (*DispatchResult) XXX_Size

func (m *DispatchResult) XXX_Size() int

func (*DispatchResult) XXX_Unmarshal

func (m *DispatchResult) XXX_Unmarshal(b []byte) error

type DispatchResult_ResultCode

type DispatchResult_ResultCode int32
const (
	DispatchResult_SUCCESS          DispatchResult_ResultCode = 0
	DispatchResult_UNKNOWN_ERROR    DispatchResult_ResultCode = 1
	DispatchResult_RATE_LIMIT_ERROR DispatchResult_ResultCode = 2
)

func (DispatchResult_ResultCode) EnumDescriptor

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

func (DispatchResult_ResultCode) String

func (x DispatchResult_ResultCode) String() string

type Log

type Log struct {
	Timestamp            int64    `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Fields               []*Tag   `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Log is a timestamped event with a set of tags.

func (*Log) Descriptor

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

func (*Log) GetFields

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

func (*Log) GetTimestamp

func (m *Log) GetTimestamp() int64

func (*Log) ProtoMessage

func (*Log) ProtoMessage()

func (*Log) Reset

func (m *Log) Reset()

func (*Log) String

func (m *Log) String() string

func (*Log) XXX_DiscardUnknown

func (m *Log) XXX_DiscardUnknown()

func (*Log) XXX_Marshal

func (m *Log) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Log) XXX_Merge

func (m *Log) XXX_Merge(src proto.Message)

func (*Log) XXX_Size

func (m *Log) XXX_Size() int

func (*Log) XXX_Unmarshal

func (m *Log) XXX_Unmarshal(b []byte) error

type Span

type Span struct {
	TraceId              string   `protobuf:"bytes,1,opt,name=traceId,proto3" json:"traceId,omitempty"`
	SpanId               string   `protobuf:"bytes,2,opt,name=spanId,proto3" json:"spanId,omitempty"`
	ParentSpanId         string   `protobuf:"bytes,3,opt,name=parentSpanId,proto3" json:"parentSpanId,omitempty"`
	ServiceName          string   `protobuf:"bytes,4,opt,name=serviceName,proto3" json:"serviceName,omitempty"`
	OperationName        string   `protobuf:"bytes,5,opt,name=operationName,proto3" json:"operationName,omitempty"`
	StartTime            int64    `protobuf:"varint,6,opt,name=startTime,proto3" json:"startTime,omitempty"`
	Duration             int64    `protobuf:"varint,7,opt,name=duration,proto3" json:"duration,omitempty"`
	Logs                 []*Log   `protobuf:"bytes,8,rep,name=logs,proto3" json:"logs,omitempty"`
	Tags                 []*Tag   `protobuf:"bytes,9,rep,name=tags,proto3" json:"tags,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Span represents a unit of work performed by a web.

func (*Span) Descriptor

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

func (*Span) GetDuration

func (m *Span) GetDuration() int64

func (*Span) GetLogs

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

func (*Span) GetOperationName

func (m *Span) GetOperationName() string

func (*Span) GetParentSpanId

func (m *Span) GetParentSpanId() string

func (*Span) GetServiceName

func (m *Span) GetServiceName() string

func (*Span) GetSpanId

func (m *Span) GetSpanId() string

func (*Span) GetStartTime

func (m *Span) GetStartTime() int64

func (*Span) GetTags

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

func (*Span) GetTraceId

func (m *Span) GetTraceId() string

func (*Span) ProtoMessage

func (*Span) ProtoMessage()

func (*Span) Reset

func (m *Span) Reset()

func (*Span) String

func (m *Span) String() string

func (*Span) XXX_DiscardUnknown

func (m *Span) XXX_DiscardUnknown()

func (*Span) XXX_Marshal

func (m *Span) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Span) XXX_Merge

func (m *Span) XXX_Merge(src proto.Message)

func (*Span) XXX_Size

func (m *Span) XXX_Size() int

func (*Span) XXX_Unmarshal

func (m *Span) XXX_Unmarshal(b []byte) error

type SpanAgentClient

type SpanAgentClient interface {
	Dispatch(ctx context.Context, in *Span, opts ...grpc.CallOption) (*DispatchResult, error)
}

spanAgentClient is the client API for SpanAgent web.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewSpanAgentClient

func NewSpanAgentClient(cc *grpc.ClientConn) SpanAgentClient

type SpanAgentServer

type SpanAgentServer interface {
	Dispatch(context.Context, *Span) (*DispatchResult, error)
}

SpanAgentServer is the server API for SpanAgent web.

type Tag

type Tag struct {
	Key  string      `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Type Tag_TagType `protobuf:"varint,2,opt,name=type,proto3,enum=Tag_TagType" json:"type,omitempty"`
	// Types that are valid to be assigned to Myvalue:
	//	*Tag_VStr
	//	*Tag_VLong
	//	*Tag_VDouble
	//	*Tag_VBool
	//	*Tag_VBytes
	Myvalue              isTag_Myvalue `protobuf_oneof:"myvalue"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

Tag is a strongly typed key/value pair. We use 'oneof' protobuf attribute to represent the possible tagTypes

func (*Tag) Descriptor

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

func (*Tag) GetKey

func (m *Tag) GetKey() string

func (*Tag) GetMyvalue

func (m *Tag) GetMyvalue() isTag_Myvalue

func (*Tag) GetType

func (m *Tag) GetType() Tag_TagType

func (*Tag) GetVBool

func (m *Tag) GetVBool() bool

func (*Tag) GetVBytes

func (m *Tag) GetVBytes() []byte

func (*Tag) GetVDouble

func (m *Tag) GetVDouble() float64

func (*Tag) GetVLong

func (m *Tag) GetVLong() int64

func (*Tag) GetVStr

func (m *Tag) GetVStr() string

func (*Tag) ProtoMessage

func (*Tag) ProtoMessage()

func (*Tag) Reset

func (m *Tag) Reset()

func (*Tag) String

func (m *Tag) String() string

func (*Tag) XXX_DiscardUnknown

func (m *Tag) XXX_DiscardUnknown()

func (*Tag) XXX_Marshal

func (m *Tag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Tag) XXX_Merge

func (m *Tag) XXX_Merge(src proto.Message)

func (*Tag) XXX_OneofWrappers

func (*Tag) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Tag) XXX_Size

func (m *Tag) XXX_Size() int

func (*Tag) XXX_Unmarshal

func (m *Tag) XXX_Unmarshal(b []byte) error

type Tag_TagType

type Tag_TagType int32

TagType denotes the type of a Tag's value.

const (
	Tag_STRING Tag_TagType = 0
	Tag_DOUBLE Tag_TagType = 1
	Tag_BOOL   Tag_TagType = 2
	Tag_LONG   Tag_TagType = 3
	Tag_BINARY Tag_TagType = 4
)

func (Tag_TagType) EnumDescriptor

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

func (Tag_TagType) String

func (x Tag_TagType) String() string

type Tag_VBool

type Tag_VBool struct {
	VBool bool `protobuf:"varint,6,opt,name=vBool,proto3,oneof"`
}

type Tag_VBytes

type Tag_VBytes struct {
	VBytes []byte `protobuf:"bytes,7,opt,name=vBytes,proto3,oneof"`
}

type Tag_VDouble

type Tag_VDouble struct {
	VDouble float64 `protobuf:"fixed64,5,opt,name=vDouble,proto3,oneof"`
}

type Tag_VLong

type Tag_VLong struct {
	VLong int64 `protobuf:"varint,4,opt,name=vLong,proto3,oneof"`
}

type Tag_VStr

type Tag_VStr struct {
	VStr string `protobuf:"bytes,3,opt,name=vStr,proto3,oneof"`
}

type TestHaystackAgentSender

type TestHaystackAgentSender struct {
	// contains filtered or unexported fields
}

func CreateGrpcAgentSender

func CreateGrpcAgentSender(endpoint string) (*TestHaystackAgentSender, error)

func (*TestHaystackAgentSender) Finish

func (hsa *TestHaystackAgentSender) Finish()

func (*TestHaystackAgentSender) TestAgent

func (hsa *TestHaystackAgentSender) TestAgent(servicename string, amount int, depth int) error

func (*TestHaystackAgentSender) TestSingleSpan

func (hsa *TestHaystackAgentSender) TestSingleSpan(payload io.Reader) error

type UnimplementedSpanAgentServer

type UnimplementedSpanAgentServer struct {
}

UnimplementedSpanAgentServer can be embedded to have forward compatible implementations.

func (*UnimplementedSpanAgentServer) Dispatch

Jump to

Keyboard shortcuts

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