m3

package
v3.3.9+incompatible Latest Latest
Warning

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

Go to latest
Published: May 15, 2019 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"`
}
var MetricValue_Count_DEFAULT CountValue

func NewCountValue

func NewCountValue() *CountValue

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

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

func (*CountValue) String

func (p *CountValue) String() string

func (*CountValue) Write

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

type EmitMetricBatchArgs

type EmitMetricBatchArgs struct {
	Batch *MetricBatch `thrift:"batch,1" json:"batch"`
}

func NewEmitMetricBatchArgs

func NewEmitMetricBatchArgs() *EmitMetricBatchArgs

func (*EmitMetricBatchArgs) GetBatch

func (p *EmitMetricBatchArgs) GetBatch() *MetricBatch

func (*EmitMetricBatchArgs) IsSetBatch

func (p *EmitMetricBatchArgs) IsSetBatch() bool

func (*EmitMetricBatchArgs) Read

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

func (*EmitMetricBatchArgs) ReadField1

func (p *EmitMetricBatchArgs) ReadField1(iprot thrift.TProtocol) error

func (*EmitMetricBatchArgs) String

func (p *EmitMetricBatchArgs) String() string

func (*EmitMetricBatchArgs) Write

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

type GaugeValue

type GaugeValue struct {
	I64Value *int64   `thrift:"i64Value,1" json:"i64Value"`
	DValue   *float64 `thrift:"dValue,2" json:"dValue"`
}
var MetricValue_Gauge_DEFAULT GaugeValue

func NewGaugeValue

func NewGaugeValue() *GaugeValue

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

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

func (*GaugeValue) ReadField2

func (p *GaugeValue) ReadField2(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 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"`
	Timestamp   *int64              `thrift:"timestamp,3" json:"timestamp"`
	Tags        map[*MetricTag]bool `thrift:"tags,4" json:"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) ReadField1

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

func (*Metric) ReadField2

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

func (*Metric) ReadField3

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

func (*Metric) ReadField4

func (p *Metric) ReadField4(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"`
}
var EmitMetricBatchArgs_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) ReadField1

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

func (*MetricBatch) ReadField2

func (p *MetricBatch) ReadField2(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"`
}

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

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

func (*MetricTag) ReadField2

func (p *MetricTag) ReadField2(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"`
	Gauge *GaugeValue `thrift:"gauge,2" json:"gauge"`
	Timer *TimerValue `thrift:"timer,3" json:"timer"`
}
var Metric_MetricValue_DEFAULT *MetricValue

func NewMetricValue

func NewMetricValue() *MetricValue

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

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

func (*MetricValue) ReadField2

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

func (*MetricValue) ReadField3

func (p *MetricValue) ReadField3(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"`
	DValue   *float64 `thrift:"dValue,2" json:"dValue"`
}
var MetricValue_Timer_DEFAULT TimerValue

func NewTimerValue

func NewTimerValue() *TimerValue

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

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

func (*TimerValue) ReadField2

func (p *TimerValue) ReadField2(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