v1

package
v3.5.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

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) Read

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

func (*CountValue) String

func (p *CountValue) String() string

func (*CountValue) Write

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

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) Read

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

func (*GaugeValue) String

func (p *GaugeValue) String() string

func (*GaugeValue) Write

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

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 NewM3ClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *M3Client

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 (*M3EmitMetricBatchArgs) String

func (p *M3EmitMetricBatchArgs) String() string

func (*M3EmitMetricBatchArgs) Write

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

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 NewMetric

func NewMetric() *Metric

func (*Metric) GetMetricValue

func (p *Metric) GetMetricValue() *MetricValue

func (*Metric) GetName

func (p *Metric) GetName() string

func (*Metric) GetTags

func (p *Metric) GetTags() map[*MetricTag]bool

func (*Metric) GetTimestamp

func (p *Metric) GetTimestamp() int64

func (*Metric) IsSetMetricValue

func (p *Metric) IsSetMetricValue() bool

func (*Metric) IsSetTags

func (p *Metric) IsSetTags() bool

func (*Metric) IsSetTimestamp

func (p *Metric) IsSetTimestamp() bool

func (*Metric) Read

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

func (*Metric) String

func (p *Metric) String() string

func (*Metric) Write

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

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) Read

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

func (*MetricBatch) String

func (p *MetricBatch) String() string

func (*MetricBatch) Write

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

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 (p *MetricTag) GetTagName() string

func (*MetricTag) GetTagValue

func (p *MetricTag) GetTagValue() string

func (*MetricTag) IsSetTagValue

func (p *MetricTag) IsSetTagValue() bool

func (*MetricTag) Read

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

func (*MetricTag) String

func (p *MetricTag) String() string

func (*MetricTag) Write

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

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) Read

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

func (*MetricValue) String

func (p *MetricValue) String() string

func (*MetricValue) Write

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

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) Read

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

func (*TimerValue) String

func (p *TimerValue) String() string

func (*TimerValue) Write

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

Jump to

Keyboard shortcuts

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