v2

package
v3.5.6+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: MIT Imports: 3 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GoUnusedProtection__ int
View Source
var MetricBatch_CommonTags_DEFAULT []MetricTag
View Source
var Metric_Tags_DEFAULT []MetricTag

Functions

This section is empty.

Types

type M3

type M3 interface {
	// Parameters:
	//  - Batch
	EmitMetricBatchV2(batch MetricBatch) (err error)
}

type M3Client

type M3Client struct {
	Transport       thrift.TTransport
	ProtocolFactory thrift.TProtocolFactory
	InputProtocol   thrift.TProtocol
	OutputProtocol  thrift.TProtocol
	SeqId           int32
}

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

func (p *M3Client) EmitMetricBatchV2(batch MetricBatch) (err error)

Parameters:

  • Batch

type M3EmitMetricBatchV2Args

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

Attributes:

  • Batch

func NewM3EmitMetricBatchV2Args

func NewM3EmitMetricBatchV2Args() *M3EmitMetricBatchV2Args

func (*M3EmitMetricBatchV2Args) GetBatch

func (p *M3EmitMetricBatchV2Args) GetBatch() MetricBatch

func (*M3EmitMetricBatchV2Args) IsSetBatch

func (p *M3EmitMetricBatchV2Args) IsSetBatch() bool

func (*M3EmitMetricBatchV2Args) Read

func (*M3EmitMetricBatchV2Args) String

func (p *M3EmitMetricBatchV2Args) String() string

func (*M3EmitMetricBatchV2Args) Write

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,required" json:"name"`
	Value     MetricValue `thrift:"value,2,required" json:"value"`
	Timestamp int64       `thrift:"timestamp,3,required" json:"timestamp"`
	Tags      []MetricTag `thrift:"tags,4" json:"tags,omitempty"`
}

Attributes:

  • Name
  • Value
  • Timestamp
  • Tags

func NewMetric

func NewMetric() *Metric

func (*Metric) GetName

func (p *Metric) GetName() string

func (*Metric) GetTags

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

func (*Metric) GetTimestamp

func (p *Metric) GetTimestamp() int64

func (*Metric) GetValue

func (p *Metric) GetValue() MetricValue

func (*Metric) IsSetTags

func (p *Metric) IsSetTags() bool

func (*Metric) IsSetValue

func (p *Metric) IsSetValue() 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,required" json:"metrics"`
	CommonTags []MetricTag `thrift:"commonTags,2" json:"commonTags,omitempty"`
}

Attributes:

  • Metrics
  • CommonTags
var M3EmitMetricBatchV2Args_Batch_DEFAULT MetricBatch

func NewMetricBatch

func NewMetricBatch() *MetricBatch

func (*MetricBatch) GetCommonTags

func (p *MetricBatch) GetCommonTags() []MetricTag

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 {
	Name  string `thrift:"name,1,required" json:"name"`
	Value string `thrift:"value,2,required" json:"value"`
}

Attributes:

  • Name
  • Value

func NewMetricTag

func NewMetricTag() *MetricTag

func (*MetricTag) GetName

func (p *MetricTag) GetName() string

func (*MetricTag) GetValue

func (p *MetricTag) GetValue() string

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 MetricType

type MetricType int64
const (
	MetricType_INVALID MetricType = 0
	MetricType_COUNTER MetricType = 1
	MetricType_GAUGE   MetricType = 2
	MetricType_TIMER   MetricType = 3
)

func MetricTypeFromString

func MetricTypeFromString(s string) (MetricType, error)

func MetricTypePtr

func MetricTypePtr(v MetricType) *MetricType

func (MetricType) MarshalText

func (p MetricType) MarshalText() ([]byte, error)

func (MetricType) String

func (p MetricType) String() string

func (*MetricType) UnmarshalText

func (p *MetricType) UnmarshalText(text []byte) error

type MetricValue

type MetricValue struct {
	MetricType MetricType `thrift:"metricType,1,required" json:"metricType"`
	Count      int64      `thrift:"count,2,required" json:"count"`
	Gauge      float64    `thrift:"gauge,3,required" json:"gauge"`
	Timer      int64      `thrift:"timer,4,required" json:"timer"`
}

Attributes:

  • MetricType
  • Count
  • Gauge
  • Timer
var Metric_Value_DEFAULT MetricValue

func NewMetricValue

func NewMetricValue() *MetricValue

func (*MetricValue) GetCount

func (p *MetricValue) GetCount() int64

func (*MetricValue) GetGauge

func (p *MetricValue) GetGauge() float64

func (*MetricValue) GetMetricType

func (p *MetricValue) GetMetricType() MetricType

func (*MetricValue) GetTimer

func (p *MetricValue) GetTimer() int64

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

Jump to

Keyboard shortcuts

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