Documentation ¶
Overview ¶
Package sampling is generated code used to make or handle TChannel calls using Thrift.
Index ¶
- Variables
- func NewTChanSamplingManagerInheritedClient(thriftService string, client thrift.TChanClient) *tchanSamplingManagerClient
- func NewTChanSamplingManagerServer(handler TChanSamplingManager) thrift.TChanServer
- type OperationSamplingStrategy
- func (p *OperationSamplingStrategy) GetOperation() string
- func (p *OperationSamplingStrategy) GetProbabilisticSampling() *ProbabilisticSamplingStrategy
- func (p *OperationSamplingStrategy) IsSetProbabilisticSampling() bool
- func (p *OperationSamplingStrategy) Read(iprot thrift.TProtocol) error
- func (p *OperationSamplingStrategy) String() string
- func (p *OperationSamplingStrategy) Write(oprot thrift.TProtocol) error
- type PerOperationSamplingStrategies
- func (p *PerOperationSamplingStrategies) GetDefaultLowerBoundTracesPerSecond() float64
- func (p *PerOperationSamplingStrategies) GetDefaultSamplingProbability() float64
- func (p *PerOperationSamplingStrategies) GetDefaultUpperBoundTracesPerSecond() float64
- func (p *PerOperationSamplingStrategies) GetPerOperationStrategies() []*OperationSamplingStrategy
- func (p *PerOperationSamplingStrategies) IsSetDefaultUpperBoundTracesPerSecond() bool
- func (p *PerOperationSamplingStrategies) Read(iprot thrift.TProtocol) error
- func (p *PerOperationSamplingStrategies) String() string
- func (p *PerOperationSamplingStrategies) Write(oprot thrift.TProtocol) error
- type ProbabilisticSamplingStrategy
- type RateLimitingSamplingStrategy
- type SamplingManager
- type SamplingManagerClient
- type SamplingManagerGetSamplingStrategyArgs
- func (p *SamplingManagerGetSamplingStrategyArgs) GetServiceName() string
- func (p *SamplingManagerGetSamplingStrategyArgs) Read(iprot thrift.TProtocol) error
- func (p *SamplingManagerGetSamplingStrategyArgs) String() string
- func (p *SamplingManagerGetSamplingStrategyArgs) Write(oprot thrift.TProtocol) error
- type SamplingManagerGetSamplingStrategyResult
- func (p *SamplingManagerGetSamplingStrategyResult) GetSuccess() *SamplingStrategyResponse
- func (p *SamplingManagerGetSamplingStrategyResult) IsSetSuccess() bool
- func (p *SamplingManagerGetSamplingStrategyResult) Read(iprot thrift.TProtocol) error
- func (p *SamplingManagerGetSamplingStrategyResult) String() string
- func (p *SamplingManagerGetSamplingStrategyResult) Write(oprot thrift.TProtocol) error
- type SamplingManagerProcessor
- func (p *SamplingManagerProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)
- func (p *SamplingManagerProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)
- func (p *SamplingManagerProcessor) Process(iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)
- func (p *SamplingManagerProcessor) ProcessorMap() map[string]thrift.TProcessorFunction
- type SamplingStrategyResponse
- func (p *SamplingStrategyResponse) GetOperationSampling() *PerOperationSamplingStrategies
- func (p *SamplingStrategyResponse) GetProbabilisticSampling() *ProbabilisticSamplingStrategy
- func (p *SamplingStrategyResponse) GetRateLimitingSampling() *RateLimitingSamplingStrategy
- func (p *SamplingStrategyResponse) GetStrategyType() SamplingStrategyType
- func (p *SamplingStrategyResponse) IsSetOperationSampling() bool
- 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 TChanSamplingManager
Constants ¶
This section is empty.
Variables ¶
View Source
var GoUnusedProtection__ int
View Source
var PerOperationSamplingStrategies_DefaultUpperBoundTracesPerSecond_DEFAULT float64
Functions ¶
func NewTChanSamplingManagerInheritedClient ¶
func NewTChanSamplingManagerInheritedClient(thriftService string, client thrift.TChanClient) *tchanSamplingManagerClient
func NewTChanSamplingManagerServer ¶
func NewTChanSamplingManagerServer(handler TChanSamplingManager) thrift.TChanServer
NewTChanSamplingManagerServer wraps a handler for TChanSamplingManager so it can be registered with a thrift.Server.
Types ¶
type OperationSamplingStrategy ¶
type OperationSamplingStrategy struct { Operation string `thrift:"operation,1,required" json:"operation"` ProbabilisticSampling *ProbabilisticSamplingStrategy `thrift:"probabilisticSampling,2,required" json:"probabilisticSampling"` }
Attributes:
- Operation
- ProbabilisticSampling
func NewOperationSamplingStrategy ¶
func NewOperationSamplingStrategy() *OperationSamplingStrategy
func (*OperationSamplingStrategy) GetOperation ¶
func (p *OperationSamplingStrategy) GetOperation() string
func (*OperationSamplingStrategy) GetProbabilisticSampling ¶
func (p *OperationSamplingStrategy) GetProbabilisticSampling() *ProbabilisticSamplingStrategy
func (*OperationSamplingStrategy) IsSetProbabilisticSampling ¶
func (p *OperationSamplingStrategy) IsSetProbabilisticSampling() bool
func (*OperationSamplingStrategy) Read ¶
func (p *OperationSamplingStrategy) Read(iprot thrift.TProtocol) error
func (*OperationSamplingStrategy) String ¶
func (p *OperationSamplingStrategy) String() string
type PerOperationSamplingStrategies ¶
type PerOperationSamplingStrategies struct { DefaultSamplingProbability float64 `thrift:"defaultSamplingProbability,1,required" json:"defaultSamplingProbability"` DefaultLowerBoundTracesPerSecond float64 `thrift:"defaultLowerBoundTracesPerSecond,2,required" json:"defaultLowerBoundTracesPerSecond"` PerOperationStrategies []*OperationSamplingStrategy `thrift:"perOperationStrategies,3,required" json:"perOperationStrategies"` DefaultUpperBoundTracesPerSecond *float64 `thrift:"defaultUpperBoundTracesPerSecond,4" json:"defaultUpperBoundTracesPerSecond,omitempty"` }
Attributes:
- DefaultSamplingProbability
- DefaultLowerBoundTracesPerSecond
- PerOperationStrategies
- DefaultUpperBoundTracesPerSecond
var SamplingStrategyResponse_OperationSampling_DEFAULT *PerOperationSamplingStrategies
func NewPerOperationSamplingStrategies ¶
func NewPerOperationSamplingStrategies() *PerOperationSamplingStrategies
func (*PerOperationSamplingStrategies) GetDefaultLowerBoundTracesPerSecond ¶
func (p *PerOperationSamplingStrategies) GetDefaultLowerBoundTracesPerSecond() float64
func (*PerOperationSamplingStrategies) GetDefaultSamplingProbability ¶
func (p *PerOperationSamplingStrategies) GetDefaultSamplingProbability() float64
func (*PerOperationSamplingStrategies) GetDefaultUpperBoundTracesPerSecond ¶
func (p *PerOperationSamplingStrategies) GetDefaultUpperBoundTracesPerSecond() float64
func (*PerOperationSamplingStrategies) GetPerOperationStrategies ¶
func (p *PerOperationSamplingStrategies) GetPerOperationStrategies() []*OperationSamplingStrategy
func (*PerOperationSamplingStrategies) IsSetDefaultUpperBoundTracesPerSecond ¶
func (p *PerOperationSamplingStrategies) IsSetDefaultUpperBoundTracesPerSecond() bool
func (*PerOperationSamplingStrategies) Read ¶
func (p *PerOperationSamplingStrategies) Read(iprot thrift.TProtocol) error
func (*PerOperationSamplingStrategies) String ¶
func (p *PerOperationSamplingStrategies) String() string
type ProbabilisticSamplingStrategy ¶
type ProbabilisticSamplingStrategy struct {
SamplingRate float64 `thrift:"samplingRate,1,required" json:"samplingRate"`
}
Attributes:
- SamplingRate
var OperationSamplingStrategy_ProbabilisticSampling_DEFAULT *ProbabilisticSamplingStrategy
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 SamplingManager ¶
type SamplingManager interface { // Parameters: // - ServiceName GetSamplingStrategy(serviceName string) (r *SamplingStrategyResponse, err error) }
type SamplingManagerClient ¶
type SamplingManagerClient struct { Transport thrift.TTransport ProtocolFactory thrift.TProtocolFactory InputProtocol thrift.TProtocol OutputProtocol thrift.TProtocol SeqId int32 }
func NewSamplingManagerClientFactory ¶
func NewSamplingManagerClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *SamplingManagerClient
func NewSamplingManagerClientProtocol ¶
func NewSamplingManagerClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *SamplingManagerClient
func (*SamplingManagerClient) GetSamplingStrategy ¶
func (p *SamplingManagerClient) GetSamplingStrategy(serviceName string) (r *SamplingStrategyResponse, err error)
Parameters:
- ServiceName
type SamplingManagerGetSamplingStrategyArgs ¶
type SamplingManagerGetSamplingStrategyArgs struct {
ServiceName string `thrift:"serviceName,1" json:"serviceName"`
}
Attributes:
- ServiceName
func NewSamplingManagerGetSamplingStrategyArgs ¶
func NewSamplingManagerGetSamplingStrategyArgs() *SamplingManagerGetSamplingStrategyArgs
func (*SamplingManagerGetSamplingStrategyArgs) GetServiceName ¶
func (p *SamplingManagerGetSamplingStrategyArgs) GetServiceName() string
func (*SamplingManagerGetSamplingStrategyArgs) Read ¶
func (p *SamplingManagerGetSamplingStrategyArgs) Read(iprot thrift.TProtocol) error
func (*SamplingManagerGetSamplingStrategyArgs) String ¶
func (p *SamplingManagerGetSamplingStrategyArgs) String() string
type SamplingManagerGetSamplingStrategyResult ¶
type SamplingManagerGetSamplingStrategyResult struct {
Success *SamplingStrategyResponse `thrift:"success,0" json:"success,omitempty"`
}
Attributes:
- Success
func NewSamplingManagerGetSamplingStrategyResult ¶
func NewSamplingManagerGetSamplingStrategyResult() *SamplingManagerGetSamplingStrategyResult
func (*SamplingManagerGetSamplingStrategyResult) GetSuccess ¶
func (p *SamplingManagerGetSamplingStrategyResult) GetSuccess() *SamplingStrategyResponse
func (*SamplingManagerGetSamplingStrategyResult) IsSetSuccess ¶
func (p *SamplingManagerGetSamplingStrategyResult) IsSetSuccess() bool
func (*SamplingManagerGetSamplingStrategyResult) Read ¶
func (p *SamplingManagerGetSamplingStrategyResult) Read(iprot thrift.TProtocol) error
func (*SamplingManagerGetSamplingStrategyResult) String ¶
func (p *SamplingManagerGetSamplingStrategyResult) String() string
type SamplingManagerProcessor ¶
type SamplingManagerProcessor struct {
// contains filtered or unexported fields
}
func NewSamplingManagerProcessor ¶
func NewSamplingManagerProcessor(handler SamplingManager) *SamplingManagerProcessor
func (*SamplingManagerProcessor) AddToProcessorMap ¶
func (p *SamplingManagerProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)
func (*SamplingManagerProcessor) GetProcessorFunction ¶
func (p *SamplingManagerProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)
func (*SamplingManagerProcessor) Process ¶
func (p *SamplingManagerProcessor) Process(iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)
func (*SamplingManagerProcessor) ProcessorMap ¶
func (p *SamplingManagerProcessor) ProcessorMap() map[string]thrift.TProcessorFunction
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"` OperationSampling *PerOperationSamplingStrategies `thrift:"operationSampling,4" json:"operationSampling,omitempty"` }
Attributes:
- StrategyType
- ProbabilisticSampling
- RateLimitingSampling
- OperationSampling
var SamplingManagerGetSamplingStrategyResult_Success_DEFAULT *SamplingStrategyResponse
func NewSamplingStrategyResponse ¶
func NewSamplingStrategyResponse() *SamplingStrategyResponse
func (*SamplingStrategyResponse) GetOperationSampling ¶
func (p *SamplingStrategyResponse) GetOperationSampling() *PerOperationSamplingStrategies
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) IsSetOperationSampling ¶
func (p *SamplingStrategyResponse) IsSetOperationSampling() bool
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 TChanSamplingManager ¶
type TChanSamplingManager interface {
GetSamplingStrategy(ctx thrift.Context, serviceName string) (*SamplingStrategyResponse, error)
}
TChanSamplingManager is the interface that defines the server handler and client interface.
func NewTChanSamplingManagerClient ¶
func NewTChanSamplingManagerClient(client thrift.TChanClient) TChanSamplingManager
NewTChanSamplingManagerClient creates a client that can be used to make remote calls.
Click to show internal directories.
Click to hide internal directories.