Documentation ¶
Overview ¶
Package tcollector is generated code used to make or handle TChannel calls using Thrift.
Index ¶
- Variables
- func NewTChanTCollectorInheritedClient(thriftService string, client thrift.TChanClient) *tchanTCollectorClient
- func NewTChanTCollectorServer(handler TChanTCollector) thrift.TChanServer
- type Annotation
- func (p *Annotation) GetDuration() int32
- func (p *Annotation) GetTimestamp() float64
- func (p *Annotation) GetValue() string
- func (p *Annotation) IsSetDuration() bool
- func (p *Annotation) Read(iprot thrift.TProtocol) error
- func (p *Annotation) String() string
- func (p *Annotation) Write(oprot thrift.TProtocol) error
- type AnnotationType
- type BinaryAnnotation
- func (p *BinaryAnnotation) GetAnnotationType() AnnotationType
- func (p *BinaryAnnotation) GetBoolValue() bool
- func (p *BinaryAnnotation) GetBytesValue() []byte
- func (p *BinaryAnnotation) GetDoubleValue() float64
- func (p *BinaryAnnotation) GetIntValue() int64
- func (p *BinaryAnnotation) GetKey() string
- func (p *BinaryAnnotation) GetStringValue() string
- func (p *BinaryAnnotation) IsSetBoolValue() bool
- func (p *BinaryAnnotation) IsSetBytesValue() bool
- func (p *BinaryAnnotation) IsSetDoubleValue() bool
- func (p *BinaryAnnotation) IsSetIntValue() bool
- func (p *BinaryAnnotation) IsSetStringValue() bool
- func (p *BinaryAnnotation) Read(iprot thrift.TProtocol) error
- func (p *BinaryAnnotation) String() string
- func (p *BinaryAnnotation) Write(oprot thrift.TProtocol) error
- type Endpoint
- type ProbabilisticSamplingStrategy
- type RateLimitingSamplingStrategy
- type Response
- type SamplingStrategyResponse
- func (p *SamplingStrategyResponse) GetProbabilisticSampling() *ProbabilisticSamplingStrategy
- func (p *SamplingStrategyResponse) GetRateLimitingSampling() *RateLimitingSamplingStrategy
- func (p *SamplingStrategyResponse) GetStrategyType() SamplingStrategyType
- func (p *SamplingStrategyResponse) IsSetProbabilisticSampling() bool
- func (p *SamplingStrategyResponse) IsSetRateLimitingSampling() bool
- func (p *SamplingStrategyResponse) Read(iprot thrift.TProtocol) error
- func (p *SamplingStrategyResponse) String() string
- func (p *SamplingStrategyResponse) Write(oprot thrift.TProtocol) error
- type SamplingStrategyType
- type Span
- func (p *Span) GetAnnotations() []*Annotation
- func (p *Span) GetBinaryAnnotations() []*BinaryAnnotation
- func (p *Span) GetDebug() bool
- func (p *Span) GetHost() *Endpoint
- func (p *Span) GetID() []byte
- func (p *Span) GetName() string
- func (p *Span) GetParentId() []byte
- func (p *Span) GetSpanHost() *Endpoint
- func (p *Span) GetTraceId() []byte
- func (p *Span) IsSetDebug() bool
- func (p *Span) IsSetHost() bool
- func (p *Span) IsSetSpanHost() bool
- func (p *Span) Read(iprot thrift.TProtocol) error
- func (p *Span) String() string
- func (p *Span) Write(oprot thrift.TProtocol) error
- type TChanTCollector
- type TCollector
- type TCollectorClient
- type TCollectorGetSamplingStrategyArgs
- type TCollectorGetSamplingStrategyResult
- func (p *TCollectorGetSamplingStrategyResult) GetSuccess() *SamplingStrategyResponse
- func (p *TCollectorGetSamplingStrategyResult) IsSetSuccess() bool
- func (p *TCollectorGetSamplingStrategyResult) Read(iprot thrift.TProtocol) error
- func (p *TCollectorGetSamplingStrategyResult) String() string
- func (p *TCollectorGetSamplingStrategyResult) Write(oprot thrift.TProtocol) error
- type TCollectorProcessor
- func (p *TCollectorProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)
- func (p *TCollectorProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)
- func (p *TCollectorProcessor) Process(iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)
- func (p *TCollectorProcessor) ProcessorMap() map[string]thrift.TProcessorFunction
- type TCollectorSubmitArgs
- type TCollectorSubmitBatchArgs
- type TCollectorSubmitBatchResult
- func (p *TCollectorSubmitBatchResult) GetSuccess() []*Response
- func (p *TCollectorSubmitBatchResult) IsSetSuccess() bool
- func (p *TCollectorSubmitBatchResult) Read(iprot thrift.TProtocol) error
- func (p *TCollectorSubmitBatchResult) String() string
- func (p *TCollectorSubmitBatchResult) Write(oprot thrift.TProtocol) error
- type TCollectorSubmitResult
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) String ¶
func (p *Annotation) String() string
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) String ¶
func (p *BinaryAnnotation) String() string
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) GetServiceName ¶
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 (p *ProbabilisticSamplingStrategy) Read(iprot thrift.TProtocol) error
func (*ProbabilisticSamplingStrategy) String ¶
func (p *ProbabilisticSamplingStrategy) String() string
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 (p *RateLimitingSamplingStrategy) Read(iprot thrift.TProtocol) error
func (*RateLimitingSamplingStrategy) String ¶
func (p *RateLimitingSamplingStrategy) String() string
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
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 (p *SamplingStrategyResponse) Read(iprot thrift.TProtocol) error
func (*SamplingStrategyResponse) String ¶
func (p *SamplingStrategyResponse) String() string
type SamplingStrategyType ¶
type SamplingStrategyType int64
const ( SamplingStrategyType_PROBABILISTIC SamplingStrategyType = 0 SamplingStrategyType_RATE_LIMITING SamplingStrategyType = 1 )
func SamplingStrategyTypeFromString ¶
func SamplingStrategyTypeFromString(s string) (SamplingStrategyType, error)
func SamplingStrategyTypePtr ¶
func SamplingStrategyTypePtr(v SamplingStrategyType) *SamplingStrategyType
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 (*Span) GetAnnotations ¶
func (p *Span) GetAnnotations() []*Annotation
func (*Span) GetBinaryAnnotations ¶
func (p *Span) GetBinaryAnnotations() []*BinaryAnnotation
func (*Span) GetParentId ¶
func (*Span) GetSpanHost ¶
func (*Span) GetTraceId ¶
func (*Span) IsSetDebug ¶
func (*Span) IsSetSpanHost ¶
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 TCollectorClient ¶
type TCollectorClient struct { Transport thrift.TTransport ProtocolFactory thrift.TProtocolFactory InputProtocol thrift.TProtocol OutputProtocol thrift.TProtocol SeqId int32 }
func NewTCollectorClientFactory ¶
func NewTCollectorClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *TCollectorClient
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 (p *TCollectorGetSamplingStrategyArgs) Read(iprot thrift.TProtocol) error
func (*TCollectorGetSamplingStrategyArgs) String ¶
func (p *TCollectorGetSamplingStrategyArgs) String() string
type TCollectorGetSamplingStrategyResult ¶
type TCollectorGetSamplingStrategyResult struct {
Success *SamplingStrategyResponse `thrift:"success,0" json:"success,omitempty"`
}
Attributes:
- Success
func NewTCollectorGetSamplingStrategyResult ¶
func NewTCollectorGetSamplingStrategyResult() *TCollectorGetSamplingStrategyResult
func (*TCollectorGetSamplingStrategyResult) GetSuccess ¶
func (p *TCollectorGetSamplingStrategyResult) GetSuccess() *SamplingStrategyResponse
func (*TCollectorGetSamplingStrategyResult) IsSetSuccess ¶
func (p *TCollectorGetSamplingStrategyResult) IsSetSuccess() bool
func (*TCollectorGetSamplingStrategyResult) Read ¶
func (p *TCollectorGetSamplingStrategyResult) Read(iprot thrift.TProtocol) error
func (*TCollectorGetSamplingStrategyResult) String ¶
func (p *TCollectorGetSamplingStrategyResult) String() string
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
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 (p *TCollectorSubmitBatchArgs) Read(iprot thrift.TProtocol) error
func (*TCollectorSubmitBatchArgs) String ¶
func (p *TCollectorSubmitBatchArgs) String() string
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 (p *TCollectorSubmitBatchResult) Read(iprot thrift.TProtocol) error
func (*TCollectorSubmitBatchResult) String ¶
func (p *TCollectorSubmitBatchResult) String() string
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 (p *TCollectorSubmitResult) Read(iprot thrift.TProtocol) error
func (*TCollectorSubmitResult) String ¶
func (p *TCollectorSubmitResult) String() string
Click to show internal directories.
Click to hide internal directories.