Documentation ¶
Index ¶
- Variables
- type CountValue
- type GaugeValue
- func (p *GaugeValue) CountSetFieldsGaugeValue() int
- func (p *GaugeValue) GetDValue() float64
- func (p *GaugeValue) GetI64Value() int64
- func (p *GaugeValue) IsSetDValue() bool
- func (p *GaugeValue) IsSetI64Value() bool
- func (p *GaugeValue) Read(iprot thrift.TProtocol) error
- func (p *GaugeValue) String() string
- func (p *GaugeValue) Write(oprot thrift.TProtocol) error
- type M3
- type M3Client
- type M3EmitMetricBatchArgs
- type M3Processor
- func (p *M3Processor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)
- func (p *M3Processor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)
- func (p *M3Processor) Process(iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)
- func (p *M3Processor) ProcessorMap() map[string]thrift.TProcessorFunction
- type Metric
- func (p *Metric) GetMetricValue() *MetricValue
- func (p *Metric) GetName() string
- func (p *Metric) GetTags() map[*MetricTag]bool
- func (p *Metric) GetTimestamp() int64
- func (p *Metric) IsSetMetricValue() bool
- func (p *Metric) IsSetTags() bool
- func (p *Metric) IsSetTimestamp() bool
- func (p *Metric) Read(iprot thrift.TProtocol) error
- func (p *Metric) String() string
- func (p *Metric) Write(oprot thrift.TProtocol) error
- type MetricBatch
- func (p *MetricBatch) GetCommonTags() map[*MetricTag]bool
- func (p *MetricBatch) GetMetrics() []*Metric
- func (p *MetricBatch) IsSetCommonTags() bool
- func (p *MetricBatch) Read(iprot thrift.TProtocol) error
- func (p *MetricBatch) String() string
- func (p *MetricBatch) Write(oprot thrift.TProtocol) error
- type MetricTag
- type MetricValue
- func (p *MetricValue) CountSetFieldsMetricValue() int
- func (p *MetricValue) GetCount() CountValue
- func (p *MetricValue) GetGauge() GaugeValue
- func (p *MetricValue) GetTimer() TimerValue
- func (p *MetricValue) IsSetCount() bool
- func (p *MetricValue) IsSetGauge() bool
- func (p *MetricValue) IsSetTimer() bool
- func (p *MetricValue) Read(iprot thrift.TProtocol) error
- func (p *MetricValue) String() string
- func (p *MetricValue) Write(oprot thrift.TProtocol) error
- type TimerValue
- func (p *TimerValue) CountSetFieldsTimerValue() int
- func (p *TimerValue) GetDValue() float64
- func (p *TimerValue) GetI64Value() int64
- func (p *TimerValue) IsSetDValue() bool
- func (p *TimerValue) IsSetI64Value() bool
- func (p *TimerValue) Read(iprot thrift.TProtocol) error
- func (p *TimerValue) String() string
- func (p *TimerValue) Write(oprot thrift.TProtocol) error
Constants ¶
This section is empty.
Variables ¶
View Source
var CountValue_I64Value_DEFAULT int64
View Source
var GaugeValue_DValue_DEFAULT float64
View Source
var GaugeValue_I64Value_DEFAULT int64
View Source
var GoUnusedProtection__ int
View Source
var MetricBatch_CommonTags_DEFAULT map[*MetricTag]bool
View Source
var MetricTag_TagValue_DEFAULT string
View Source
var Metric_Tags_DEFAULT map[*MetricTag]bool
View Source
var Metric_Timestamp_DEFAULT int64
View Source
var TimerValue_DValue_DEFAULT float64
View Source
var TimerValue_I64Value_DEFAULT int64
Functions ¶
This section is empty.
Types ¶
type CountValue ¶
type CountValue struct {
I64Value *int64 `thrift:"i64Value,1" json:"i64Value,omitempty"`
}
Different types of count values
Attributes:
- I64Value
var MetricValue_Count_DEFAULT CountValue
func NewCountValue ¶
func NewCountValue() *CountValue
func (*CountValue) CountSetFieldsCountValue ¶
func (p *CountValue) CountSetFieldsCountValue() int
func (*CountValue) GetI64Value ¶
func (p *CountValue) GetI64Value() int64
func (*CountValue) IsSetI64Value ¶
func (p *CountValue) IsSetI64Value() bool
func (*CountValue) String ¶
func (p *CountValue) String() string
type GaugeValue ¶
type GaugeValue struct { I64Value *int64 `thrift:"i64Value,1" json:"i64Value,omitempty"` DValue *float64 `thrift:"dValue,2" json:"dValue,omitempty"` }
Different types of gauge values
Attributes:
- I64Value
- DValue
var MetricValue_Gauge_DEFAULT GaugeValue
func NewGaugeValue ¶
func NewGaugeValue() *GaugeValue
func (*GaugeValue) CountSetFieldsGaugeValue ¶
func (p *GaugeValue) CountSetFieldsGaugeValue() int
func (*GaugeValue) GetDValue ¶
func (p *GaugeValue) GetDValue() float64
func (*GaugeValue) GetI64Value ¶
func (p *GaugeValue) GetI64Value() int64
func (*GaugeValue) IsSetDValue ¶
func (p *GaugeValue) IsSetDValue() bool
func (*GaugeValue) IsSetI64Value ¶
func (p *GaugeValue) IsSetI64Value() bool
func (*GaugeValue) String ¶
func (p *GaugeValue) String() string
type M3 ¶
type M3 interface { // Emits a batch of metrics. // // Parameters: // - Batch EmitMetricBatch(batch *MetricBatch) (err error) }
type M3Client ¶
type M3Client struct { Transport thrift.TTransport ProtocolFactory thrift.TProtocolFactory InputProtocol thrift.TProtocol OutputProtocol thrift.TProtocol SeqId int32 }
M3 Metrics Service
func NewM3ClientFactory ¶
func NewM3ClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *M3Client
func NewM3ClientProtocol ¶
func (*M3Client) EmitMetricBatch ¶
func (p *M3Client) EmitMetricBatch(batch *MetricBatch) (err error)
Emits a batch of metrics.
Parameters:
- Batch
type M3EmitMetricBatchArgs ¶
type M3EmitMetricBatchArgs struct {
Batch *MetricBatch `thrift:"batch,1" json:"batch"`
}
Attributes:
- Batch
func NewM3EmitMetricBatchArgs ¶
func NewM3EmitMetricBatchArgs() *M3EmitMetricBatchArgs
func (*M3EmitMetricBatchArgs) GetBatch ¶
func (p *M3EmitMetricBatchArgs) GetBatch() *MetricBatch
func (*M3EmitMetricBatchArgs) IsSetBatch ¶
func (p *M3EmitMetricBatchArgs) IsSetBatch() bool
func (*M3EmitMetricBatchArgs) Read ¶
func (p *M3EmitMetricBatchArgs) Read(iprot thrift.TProtocol) error
func (*M3EmitMetricBatchArgs) String ¶
func (p *M3EmitMetricBatchArgs) String() string
type M3Processor ¶
type M3Processor struct {
// contains filtered or unexported fields
}
func NewM3Processor ¶
func NewM3Processor(handler M3) *M3Processor
func (*M3Processor) AddToProcessorMap ¶
func (p *M3Processor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)
func (*M3Processor) GetProcessorFunction ¶
func (p *M3Processor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)
func (*M3Processor) Process ¶
func (p *M3Processor) Process(iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)
func (*M3Processor) ProcessorMap ¶
func (p *M3Processor) ProcessorMap() map[string]thrift.TProcessorFunction
type Metric ¶
type Metric struct { Name string `thrift:"name,1" json:"name"` MetricValue *MetricValue `thrift:"metricValue,2" json:"metricValue,omitempty"` Timestamp *int64 `thrift:"timestamp,3" json:"timestamp,omitempty"` Tags map[*MetricTag]bool `thrift:"tags,4" json:"tags,omitempty"` }
The metric that is being emitted
Attributes:
- Name
- MetricValue
- Timestamp
- Tags
func (*Metric) GetMetricValue ¶
func (p *Metric) GetMetricValue() *MetricValue
func (*Metric) GetTimestamp ¶
func (*Metric) IsSetMetricValue ¶
func (*Metric) IsSetTimestamp ¶
type MetricBatch ¶
type MetricBatch struct { Metrics []*Metric `thrift:"metrics,1" json:"metrics"` CommonTags map[*MetricTag]bool `thrift:"commonTags,2" json:"commonTags,omitempty"` }
Structure that holds a group of metrics which share common properties like the cluster and service.
Attributes:
- Metrics
- CommonTags
var M3EmitMetricBatchArgs_Batch_DEFAULT *MetricBatch
func NewMetricBatch ¶
func NewMetricBatch() *MetricBatch
func (*MetricBatch) GetCommonTags ¶
func (p *MetricBatch) GetCommonTags() map[*MetricTag]bool
func (*MetricBatch) GetMetrics ¶
func (p *MetricBatch) GetMetrics() []*Metric
func (*MetricBatch) IsSetCommonTags ¶
func (p *MetricBatch) IsSetCommonTags() bool
func (*MetricBatch) String ¶
func (p *MetricBatch) String() string
type MetricTag ¶
type MetricTag struct { TagName string `thrift:"tagName,1" json:"tagName"` TagValue *string `thrift:"tagValue,2" json:"tagValue,omitempty"` }
Tags that can be applied to a metric
Attributes:
- TagName
- TagValue
func NewMetricTag ¶
func NewMetricTag() *MetricTag
func (*MetricTag) GetTagName ¶
func (*MetricTag) GetTagValue ¶
func (*MetricTag) IsSetTagValue ¶
type MetricValue ¶
type MetricValue struct { Count *CountValue `thrift:"count,1" json:"count,omitempty"` Gauge *GaugeValue `thrift:"gauge,2" json:"gauge,omitempty"` Timer *TimerValue `thrift:"timer,3" json:"timer,omitempty"` }
Different types of values that m3 emits. Each metric must contain one of these values
Attributes:
- Count
- Gauge
- Timer
var Metric_MetricValue_DEFAULT *MetricValue
func NewMetricValue ¶
func NewMetricValue() *MetricValue
func (*MetricValue) CountSetFieldsMetricValue ¶
func (p *MetricValue) CountSetFieldsMetricValue() int
func (*MetricValue) GetCount ¶
func (p *MetricValue) GetCount() CountValue
func (*MetricValue) GetGauge ¶
func (p *MetricValue) GetGauge() GaugeValue
func (*MetricValue) GetTimer ¶
func (p *MetricValue) GetTimer() TimerValue
func (*MetricValue) IsSetCount ¶
func (p *MetricValue) IsSetCount() bool
func (*MetricValue) IsSetGauge ¶
func (p *MetricValue) IsSetGauge() bool
func (*MetricValue) IsSetTimer ¶
func (p *MetricValue) IsSetTimer() bool
func (*MetricValue) String ¶
func (p *MetricValue) String() string
type TimerValue ¶
type TimerValue struct { I64Value *int64 `thrift:"i64Value,1" json:"i64Value,omitempty"` DValue *float64 `thrift:"dValue,2" json:"dValue,omitempty"` }
Different types of timer values
Attributes:
- I64Value
- DValue
var MetricValue_Timer_DEFAULT TimerValue
func NewTimerValue ¶
func NewTimerValue() *TimerValue
func (*TimerValue) CountSetFieldsTimerValue ¶
func (p *TimerValue) CountSetFieldsTimerValue() int
func (*TimerValue) GetDValue ¶
func (p *TimerValue) GetDValue() float64
func (*TimerValue) GetI64Value ¶
func (p *TimerValue) GetI64Value() int64
func (*TimerValue) IsSetDValue ¶
func (p *TimerValue) IsSetDValue() bool
func (*TimerValue) IsSetI64Value ¶
func (p *TimerValue) IsSetI64Value() bool
func (*TimerValue) String ¶
func (p *TimerValue) String() string
Click to show internal directories.
Click to hide internal directories.