unaggregated

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchTimer

type BatchTimer struct {
	ID     id.RawID
	Values []float64
}

BatchTimer is a timer containing the timer ID and a list of timer values.

func (*BatchTimer) FromProto

func (t *BatchTimer) FromProto(pb metricpb.BatchTimer)

FromProto converts the protobuf message to a batch timer in place.

func (BatchTimer) ToProto

func (t BatchTimer) ToProto(pb *metricpb.BatchTimer)

ToProto converts the batch timer to a protobuf message in place.

func (BatchTimer) ToUnion

func (t BatchTimer) ToUnion() MetricUnion

ToUnion converts the batch timer to a metric union.

type BatchTimerWithMetadatas

type BatchTimerWithMetadatas struct {
	BatchTimer
	metadata.StagedMetadatas
}

BatchTimerWithMetadatas is a batch timer with applicable metadatas.

func (*BatchTimerWithMetadatas) FromProto

FromProto converts the protobuf message to a batch timer with metadatas in place.

func (BatchTimerWithMetadatas) ToProto

ToProto converts the batch timer with metadatas to a protobuf message in place.

type BatchTimerWithPoliciesList

type BatchTimerWithPoliciesList struct {
	BatchTimer
	policy.PoliciesList
}

BatchTimerWithPoliciesList is a batch timer with applicable policies list.

type Counter

type Counter struct {
	ID    id.RawID
	Value int64
}

Counter is a counter containing the counter ID and the counter value.

func (*Counter) FromProto

func (c *Counter) FromProto(pb metricpb.Counter)

FromProto converts the protobuf message to a counter in place.

func (Counter) ToProto

func (c Counter) ToProto(pb *metricpb.Counter)

ToProto converts the counter to a protobuf message in place.

func (Counter) ToUnion

func (c Counter) ToUnion() MetricUnion

ToUnion converts the counter to a metric union.

type CounterWithMetadatas

type CounterWithMetadatas struct {
	Counter
	metadata.StagedMetadatas
}

CounterWithMetadatas is a counter with applicable metadatas.

func (*CounterWithMetadatas) FromProto

FromProto converts the protobuf message to a counter with metadatas in place.

func (CounterWithMetadatas) ToProto

ToProto converts the counter with metadatas to a protobuf message in place.

type CounterWithPoliciesList

type CounterWithPoliciesList struct {
	Counter
	policy.PoliciesList
}

CounterWithPoliciesList is a counter with applicable policies list.

type Gauge

type Gauge struct {
	ID    id.RawID
	Value float64
}

Gauge is a gauge containing the gauge ID and the value at certain time.

func (*Gauge) FromProto

func (g *Gauge) FromProto(pb metricpb.Gauge)

FromProto converts the protobuf message to a gauge in place.

func (Gauge) ToProto

func (g Gauge) ToProto(pb *metricpb.Gauge)

ToProto converts the gauge to a protobuf message in place.

func (Gauge) ToUnion

func (g Gauge) ToUnion() MetricUnion

ToUnion converts the gauge to a metric union.

type GaugeWithMetadatas

type GaugeWithMetadatas struct {
	Gauge
	metadata.StagedMetadatas
}

GaugeWithMetadatas is a gauge with applicable metadatas.

func (*GaugeWithMetadatas) FromProto

FromProto converts the protobuf message to a gauge with metadatas in place.

func (GaugeWithMetadatas) ToProto

ToProto converts the gauge with metadatas to a protobuf message in place.

type GaugeWithPoliciesList

type GaugeWithPoliciesList struct {
	Gauge
	policy.PoliciesList
}

GaugeWithPoliciesList is a gauge with applicable policies list.

type MetricUnion

type MetricUnion struct {
	Type          metric.Type
	ID            id.RawID
	CounterVal    int64
	BatchTimerVal []float64
	GaugeVal      float64
	TimerValPool  pool.FloatsPool
}

MetricUnion is a union of different types of metrics, only one of which is valid at any given time. The actual type of the metric depends on the type field, which determines which value field is valid. Note that if the timer values are allocated from a pool, the TimerValPool should be set to the originating pool, and the caller is responsible for returning the timer values to the pool.

func (*MetricUnion) BatchTimer

func (m *MetricUnion) BatchTimer() BatchTimer

BatchTimer returns the batch timer metric.

func (*MetricUnion) Counter

func (m *MetricUnion) Counter() Counter

Counter returns the counter metric.

func (*MetricUnion) Gauge

func (m *MetricUnion) Gauge() Gauge

Gauge returns the gauge metric.

func (*MetricUnion) Reset

func (m *MetricUnion) Reset()

Reset resets the metric union.

func (*MetricUnion) String

func (m *MetricUnion) String() string

String is the string representation of a metric union.

Jump to

Keyboard shortcuts

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