tcollector

package
v1.0.6-dev Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package tcollector is generated code used to make or handle TChannel calls using Thrift.

Index

Constants

This section is empty.

Variables

View Source
var Annotation_Duration_DEFAULT int32
View Source
var BinaryAnnotation_BoolValue_DEFAULT bool
View Source
var BinaryAnnotation_BytesValue_DEFAULT []byte
View Source
var BinaryAnnotation_DoubleValue_DEFAULT float64
View Source
var BinaryAnnotation_IntValue_DEFAULT int64
View Source
var BinaryAnnotation_StringValue_DEFAULT string
View Source
var GoUnusedProtection__ int
View Source
var Span_Debug_DEFAULT bool = false
View Source
var TCollectorSubmitBatchResult_Success_DEFAULT []*Response

Functions

func NewTChanTCollectorInheritedClient

func NewTChanTCollectorInheritedClient(thriftService string, client thrift.TChanClient) *tchanTCollectorClient

func NewTChanTCollectorServer

func NewTChanTCollectorServer(handler TChanTCollector) thrift.TChanServer

NewTChanTCollectorServer wraps a handler for TChanTCollector so it can be registered with a thrift.Server.

Types

type Annotation

type Annotation struct {
	Timestamp float64 `thrift:"timestamp,1,required" json:"timestamp"`
	Value     string  `thrift:"value,2,required" json:"value"`
	Duration  *int32  `thrift:"duration,3" json:"duration,omitempty"`
}

Attributes:

  • Timestamp
  • Value
  • Duration

func NewAnnotation

func NewAnnotation() *Annotation

func (*Annotation) GetDuration

func (p *Annotation) GetDuration() int32

func (*Annotation) GetTimestamp

func (p *Annotation) GetTimestamp() float64

func (*Annotation) GetValue

func (p *Annotation) GetValue() string

func (*Annotation) IsSetDuration

func (p *Annotation) IsSetDuration() bool

func (*Annotation) Read

func (p *Annotation) Read(iprot thrift.TProtocol) error

func (*Annotation) String

func (p *Annotation) String() string

func (*Annotation) Write

func (p *Annotation) Write(oprot thrift.TProtocol) error

type AnnotationType

type AnnotationType int64
const (
	AnnotationType_BOOL   AnnotationType = 0
	AnnotationType_BYTES  AnnotationType = 1
	AnnotationType_I16    AnnotationType = 2
	AnnotationType_I32    AnnotationType = 3
	AnnotationType_I64    AnnotationType = 4
	AnnotationType_DOUBLE AnnotationType = 5
	AnnotationType_STRING AnnotationType = 6
)

func AnnotationTypeFromString

func AnnotationTypeFromString(s string) (AnnotationType, error)

func AnnotationTypePtr

func AnnotationTypePtr(v AnnotationType) *AnnotationType

func (AnnotationType) MarshalText

func (p AnnotationType) MarshalText() ([]byte, error)

func (AnnotationType) String

func (p AnnotationType) String() string

func (*AnnotationType) UnmarshalText

func (p *AnnotationType) UnmarshalText(text []byte) error

type BinaryAnnotation

type BinaryAnnotation struct {
	Key            string         `thrift:"key,1,required" json:"key"`
	StringValue    *string        `thrift:"stringValue,2" json:"stringValue,omitempty"`
	DoubleValue    *float64       `thrift:"doubleValue,3" json:"doubleValue,omitempty"`
	BoolValue      *bool          `thrift:"boolValue,4" json:"boolValue,omitempty"`
	BytesValue     []byte         `thrift:"bytesValue,5" json:"bytesValue,omitempty"`
	IntValue       *int64         `thrift:"intValue,6" json:"intValue,omitempty"`
	AnnotationType AnnotationType `thrift:"annotationType,7,required" json:"annotationType"`
}

Attributes:

  • Key
  • StringValue
  • DoubleValue
  • BoolValue
  • BytesValue
  • IntValue
  • AnnotationType

func NewBinaryAnnotation

func NewBinaryAnnotation() *BinaryAnnotation

func (*BinaryAnnotation) GetAnnotationType

func (p *BinaryAnnotation) GetAnnotationType() AnnotationType

func (*BinaryAnnotation) GetBoolValue

func (p *BinaryAnnotation) GetBoolValue() bool

func (*BinaryAnnotation) GetBytesValue

func (p *BinaryAnnotation) GetBytesValue() []byte

func (*BinaryAnnotation) GetDoubleValue

func (p *BinaryAnnotation) GetDoubleValue() float64

func (*BinaryAnnotation) GetIntValue

func (p *BinaryAnnotation) GetIntValue() int64

func (*BinaryAnnotation) GetKey

func (p *BinaryAnnotation) GetKey() string

func (*BinaryAnnotation) GetStringValue

func (p *BinaryAnnotation) GetStringValue() string

func (*BinaryAnnotation) IsSetBoolValue

func (p *BinaryAnnotation) IsSetBoolValue() bool

func (*BinaryAnnotation) IsSetBytesValue

func (p *BinaryAnnotation) IsSetBytesValue() bool

func (*BinaryAnnotation) IsSetDoubleValue

func (p *BinaryAnnotation) IsSetDoubleValue() bool

func (*BinaryAnnotation) IsSetIntValue

func (p *BinaryAnnotation) IsSetIntValue() bool

func (*BinaryAnnotation) IsSetStringValue

func (p *BinaryAnnotation) IsSetStringValue() bool

func (*BinaryAnnotation) Read

func (p *BinaryAnnotation) Read(iprot thrift.TProtocol) error

func (*BinaryAnnotation) String

func (p *BinaryAnnotation) String() string

func (*BinaryAnnotation) Write

func (p *BinaryAnnotation) Write(oprot thrift.TProtocol) error

type Endpoint

type Endpoint struct {
	Ipv4        int32  `thrift:"ipv4,1,required" json:"ipv4"`
	Port        int32  `thrift:"port,2,required" json:"port"`
	ServiceName string `thrift:"serviceName,3,required" json:"serviceName"`
}

Attributes:

  • Ipv4
  • Port
  • ServiceName
var Span_Host_DEFAULT *Endpoint
var Span_SpanHost_DEFAULT *Endpoint

func NewEndpoint

func NewEndpoint() *Endpoint

func (*Endpoint) GetIpv4

func (p *Endpoint) GetIpv4() int32

func (*Endpoint) GetPort

func (p *Endpoint) GetPort() int32

func (*Endpoint) GetServiceName

func (p *Endpoint) GetServiceName() string

func (*Endpoint) Read

func (p *Endpoint) Read(iprot thrift.TProtocol) error

func (*Endpoint) String

func (p *Endpoint) String() string

func (*Endpoint) Write

func (p *Endpoint) Write(oprot thrift.TProtocol) error

type ProbabilisticSamplingStrategy

type ProbabilisticSamplingStrategy struct {
	SamplingRate float64 `thrift:"samplingRate,1,required" json:"samplingRate"`
}

Attributes:

  • SamplingRate
var SamplingStrategyResponse_ProbabilisticSampling_DEFAULT *ProbabilisticSamplingStrategy

func NewProbabilisticSamplingStrategy

func NewProbabilisticSamplingStrategy() *ProbabilisticSamplingStrategy

func (*ProbabilisticSamplingStrategy) GetSamplingRate

func (p *ProbabilisticSamplingStrategy) GetSamplingRate() float64

func (*ProbabilisticSamplingStrategy) Read

func (*ProbabilisticSamplingStrategy) String

func (*ProbabilisticSamplingStrategy) Write

type RateLimitingSamplingStrategy

type RateLimitingSamplingStrategy struct {
	MaxTracesPerSecond int16 `thrift:"maxTracesPerSecond,1,required" json:"maxTracesPerSecond"`
}

Attributes:

  • MaxTracesPerSecond
var SamplingStrategyResponse_RateLimitingSampling_DEFAULT *RateLimitingSamplingStrategy

func NewRateLimitingSamplingStrategy

func NewRateLimitingSamplingStrategy() *RateLimitingSamplingStrategy

func (*RateLimitingSamplingStrategy) GetMaxTracesPerSecond

func (p *RateLimitingSamplingStrategy) GetMaxTracesPerSecond() int16

func (*RateLimitingSamplingStrategy) Read

func (*RateLimitingSamplingStrategy) String

func (*RateLimitingSamplingStrategy) Write

type Response

type Response struct {
	Ok bool `thrift:"ok,1,required" json:"ok"`
}

Attributes:

  • Ok
var TCollectorSubmitResult_Success_DEFAULT *Response

func NewResponse

func NewResponse() *Response

func (*Response) GetOk

func (p *Response) GetOk() bool

func (*Response) Read

func (p *Response) Read(iprot thrift.TProtocol) error

func (*Response) String

func (p *Response) String() string

func (*Response) Write

func (p *Response) Write(oprot thrift.TProtocol) error

type SamplingStrategyResponse

type SamplingStrategyResponse struct {
	StrategyType          SamplingStrategyType           `thrift:"strategyType,1,required" json:"strategyType"`
	ProbabilisticSampling *ProbabilisticSamplingStrategy `thrift:"probabilisticSampling,2" json:"probabilisticSampling,omitempty"`
	RateLimitingSampling  *RateLimitingSamplingStrategy  `thrift:"rateLimitingSampling,3" json:"rateLimitingSampling,omitempty"`
}

Attributes:

  • StrategyType
  • ProbabilisticSampling
  • RateLimitingSampling
var TCollectorGetSamplingStrategyResult_Success_DEFAULT *SamplingStrategyResponse

func NewSamplingStrategyResponse

func NewSamplingStrategyResponse() *SamplingStrategyResponse

func (*SamplingStrategyResponse) GetProbabilisticSampling

func (p *SamplingStrategyResponse) GetProbabilisticSampling() *ProbabilisticSamplingStrategy

func (*SamplingStrategyResponse) GetRateLimitingSampling

func (p *SamplingStrategyResponse) GetRateLimitingSampling() *RateLimitingSamplingStrategy

func (*SamplingStrategyResponse) GetStrategyType

func (p *SamplingStrategyResponse) GetStrategyType() SamplingStrategyType

func (*SamplingStrategyResponse) IsSetProbabilisticSampling

func (p *SamplingStrategyResponse) IsSetProbabilisticSampling() bool

func (*SamplingStrategyResponse) IsSetRateLimitingSampling

func (p *SamplingStrategyResponse) IsSetRateLimitingSampling() bool

func (*SamplingStrategyResponse) Read

func (*SamplingStrategyResponse) String

func (p *SamplingStrategyResponse) String() string

func (*SamplingStrategyResponse) Write

type SamplingStrategyType

type SamplingStrategyType int64
const (
	SamplingStrategyType_PROBABILISTIC SamplingStrategyType = 0
	SamplingStrategyType_RATE_LIMITING SamplingStrategyType = 1
)

func SamplingStrategyTypeFromString

func SamplingStrategyTypeFromString(s string) (SamplingStrategyType, error)

func (SamplingStrategyType) MarshalText

func (p SamplingStrategyType) MarshalText() ([]byte, error)

func (SamplingStrategyType) String

func (p SamplingStrategyType) String() string

func (*SamplingStrategyType) UnmarshalText

func (p *SamplingStrategyType) UnmarshalText(text []byte) error

type Span

type Span struct {
	TraceId           []byte              `thrift:"traceId,1,required" json:"traceId"`
	Host              *Endpoint           `thrift:"host,2,required" json:"host"`
	Name              string              `thrift:"name,3,required" json:"name"`
	ID                []byte              `thrift:"id,4,required" json:"id"`
	ParentId          []byte              `thrift:"parentId,5,required" json:"parentId"`
	Annotations       []*Annotation       `thrift:"annotations,6,required" json:"annotations"`
	BinaryAnnotations []*BinaryAnnotation `thrift:"binaryAnnotations,7,required" json:"binaryAnnotations"`
	Debug             bool                `thrift:"debug,8" json:"debug,omitempty"`
	SpanHost          *Endpoint           `thrift:"spanHost,9" json:"spanHost,omitempty"`
}

Attributes:

  • TraceId
  • Host
  • Name
  • ID
  • ParentId
  • Annotations
  • BinaryAnnotations
  • Debug
  • SpanHost
var TCollectorSubmitArgs_Span_DEFAULT *Span

func NewSpan

func NewSpan() *Span

func (*Span) GetAnnotations

func (p *Span) GetAnnotations() []*Annotation

func (*Span) GetBinaryAnnotations

func (p *Span) GetBinaryAnnotations() []*BinaryAnnotation

func (*Span) GetDebug

func (p *Span) GetDebug() bool

func (*Span) GetHost

func (p *Span) GetHost() *Endpoint

func (*Span) GetID

func (p *Span) GetID() []byte

func (*Span) GetName

func (p *Span) GetName() string

func (*Span) GetParentId

func (p *Span) GetParentId() []byte

func (*Span) GetSpanHost

func (p *Span) GetSpanHost() *Endpoint

func (*Span) GetTraceId

func (p *Span) GetTraceId() []byte

func (*Span) IsSetDebug

func (p *Span) IsSetDebug() bool

func (*Span) IsSetHost

func (p *Span) IsSetHost() bool

func (*Span) IsSetSpanHost

func (p *Span) IsSetSpanHost() bool

func (*Span) Read

func (p *Span) Read(iprot thrift.TProtocol) error

func (*Span) String

func (p *Span) String() string

func (*Span) Write

func (p *Span) Write(oprot thrift.TProtocol) error

type TChanTCollector

type TChanTCollector interface {
	GetSamplingStrategy(ctx thrift.Context, serviceName string) (*SamplingStrategyResponse, error)
	Submit(ctx thrift.Context, span *Span) (*Response, error)
	SubmitBatch(ctx thrift.Context, spans []*Span) ([]*Response, error)
}

TChanTCollector is the interface that defines the server handler and client interface.

func NewTChanTCollectorClient

func NewTChanTCollectorClient(client thrift.TChanClient) TChanTCollector

NewTChanTCollectorClient creates a client that can be used to make remote calls.

type TCollector

type TCollector interface {
	// Parameters:
	//  - Span
	Submit(span *Span) (r *Response, err error)
	// Parameters:
	//  - Spans
	SubmitBatch(spans []*Span) (r []*Response, err error)
	// Parameters:
	//  - ServiceName
	GetSamplingStrategy(serviceName string) (r *SamplingStrategyResponse, err error)
}

type TCollectorClient

type TCollectorClient struct {
	Transport       thrift.TTransport
	ProtocolFactory thrift.TProtocolFactory
	InputProtocol   thrift.TProtocol
	OutputProtocol  thrift.TProtocol
	SeqId           int32
}

func NewTCollectorClientProtocol

func NewTCollectorClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *TCollectorClient

func (*TCollectorClient) GetSamplingStrategy

func (p *TCollectorClient) GetSamplingStrategy(serviceName string) (r *SamplingStrategyResponse, err error)

Parameters:

  • ServiceName

func (*TCollectorClient) Submit

func (p *TCollectorClient) Submit(span *Span) (r *Response, err error)

Parameters:

  • Span

func (*TCollectorClient) SubmitBatch

func (p *TCollectorClient) SubmitBatch(spans []*Span) (r []*Response, err error)

Parameters:

  • Spans

type TCollectorGetSamplingStrategyArgs

type TCollectorGetSamplingStrategyArgs struct {
	ServiceName string `thrift:"serviceName,1" json:"serviceName"`
}

Attributes:

  • ServiceName

func NewTCollectorGetSamplingStrategyArgs

func NewTCollectorGetSamplingStrategyArgs() *TCollectorGetSamplingStrategyArgs

func (*TCollectorGetSamplingStrategyArgs) GetServiceName

func (p *TCollectorGetSamplingStrategyArgs) GetServiceName() string

func (*TCollectorGetSamplingStrategyArgs) Read

func (*TCollectorGetSamplingStrategyArgs) String

func (*TCollectorGetSamplingStrategyArgs) Write

type TCollectorGetSamplingStrategyResult

type TCollectorGetSamplingStrategyResult struct {
	Success *SamplingStrategyResponse `thrift:"success,0" json:"success,omitempty"`
}

Attributes:

  • Success

func NewTCollectorGetSamplingStrategyResult

func NewTCollectorGetSamplingStrategyResult() *TCollectorGetSamplingStrategyResult

func (*TCollectorGetSamplingStrategyResult) GetSuccess

func (*TCollectorGetSamplingStrategyResult) IsSetSuccess

func (p *TCollectorGetSamplingStrategyResult) IsSetSuccess() bool

func (*TCollectorGetSamplingStrategyResult) Read

func (*TCollectorGetSamplingStrategyResult) String

func (*TCollectorGetSamplingStrategyResult) Write

type TCollectorProcessor

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

func NewTCollectorProcessor

func NewTCollectorProcessor(handler TCollector) *TCollectorProcessor

func (*TCollectorProcessor) AddToProcessorMap

func (p *TCollectorProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)

func (*TCollectorProcessor) GetProcessorFunction

func (p *TCollectorProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)

func (*TCollectorProcessor) Process

func (p *TCollectorProcessor) Process(iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)

func (*TCollectorProcessor) ProcessorMap

func (p *TCollectorProcessor) ProcessorMap() map[string]thrift.TProcessorFunction

type TCollectorSubmitArgs

type TCollectorSubmitArgs struct {
	Span *Span `thrift:"span,1" json:"span"`
}

Attributes:

  • Span

func NewTCollectorSubmitArgs

func NewTCollectorSubmitArgs() *TCollectorSubmitArgs

func (*TCollectorSubmitArgs) GetSpan

func (p *TCollectorSubmitArgs) GetSpan() *Span

func (*TCollectorSubmitArgs) IsSetSpan

func (p *TCollectorSubmitArgs) IsSetSpan() bool

func (*TCollectorSubmitArgs) Read

func (p *TCollectorSubmitArgs) Read(iprot thrift.TProtocol) error

func (*TCollectorSubmitArgs) String

func (p *TCollectorSubmitArgs) String() string

func (*TCollectorSubmitArgs) Write

func (p *TCollectorSubmitArgs) Write(oprot thrift.TProtocol) error

type TCollectorSubmitBatchArgs

type TCollectorSubmitBatchArgs struct {
	Spans []*Span `thrift:"spans,1" json:"spans"`
}

Attributes:

  • Spans

func NewTCollectorSubmitBatchArgs

func NewTCollectorSubmitBatchArgs() *TCollectorSubmitBatchArgs

func (*TCollectorSubmitBatchArgs) GetSpans

func (p *TCollectorSubmitBatchArgs) GetSpans() []*Span

func (*TCollectorSubmitBatchArgs) Read

func (*TCollectorSubmitBatchArgs) String

func (p *TCollectorSubmitBatchArgs) String() string

func (*TCollectorSubmitBatchArgs) Write

type TCollectorSubmitBatchResult

type TCollectorSubmitBatchResult struct {
	Success []*Response `thrift:"success,0" json:"success,omitempty"`
}

Attributes:

  • Success

func NewTCollectorSubmitBatchResult

func NewTCollectorSubmitBatchResult() *TCollectorSubmitBatchResult

func (*TCollectorSubmitBatchResult) GetSuccess

func (p *TCollectorSubmitBatchResult) GetSuccess() []*Response

func (*TCollectorSubmitBatchResult) IsSetSuccess

func (p *TCollectorSubmitBatchResult) IsSetSuccess() bool

func (*TCollectorSubmitBatchResult) Read

func (*TCollectorSubmitBatchResult) String

func (p *TCollectorSubmitBatchResult) String() string

func (*TCollectorSubmitBatchResult) Write

type TCollectorSubmitResult

type TCollectorSubmitResult struct {
	Success *Response `thrift:"success,0" json:"success,omitempty"`
}

Attributes:

  • Success

func NewTCollectorSubmitResult

func NewTCollectorSubmitResult() *TCollectorSubmitResult

func (*TCollectorSubmitResult) GetSuccess

func (p *TCollectorSubmitResult) GetSuccess() *Response

func (*TCollectorSubmitResult) IsSetSuccess

func (p *TCollectorSubmitResult) IsSetSuccess() bool

func (*TCollectorSubmitResult) Read

func (*TCollectorSubmitResult) String

func (p *TCollectorSubmitResult) String() string

func (*TCollectorSubmitResult) Write

func (p *TCollectorSubmitResult) Write(oprot thrift.TProtocol) error

Jump to

Keyboard shortcuts

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