metricsV1

package
v6.0.0-beta.13 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CollectorType_name = map[int32]string{
		0: "COLLECTOR_TYPE_UNSPECIFIED",
		1: "COLLECTOR_TYPE_HISTOGRAM",
		2: "COLLECTOR_TYPE_GAUGE",
		3: "COLLECTOR_TYPE_COUNTER",
		4: "COLLECTOR_TYPE_SUMMARY",
	}
	CollectorType_value = map[string]int32{
		"COLLECTOR_TYPE_UNSPECIFIED": 0,
		"COLLECTOR_TYPE_HISTOGRAM":   1,
		"COLLECTOR_TYPE_GAUGE":       2,
		"COLLECTOR_TYPE_COUNTER":     3,
		"COLLECTOR_TYPE_SUMMARY":     4,
	}
)

Enum value maps for CollectorType.

View Source
var File_metrics_v1_service_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AddRequest

type AddRequest struct {
	Metric *Metric `protobuf:"bytes,1,opt,name=metric,proto3" json:"metric,omitempty"`
	// contains filtered or unexported fields
}

func (*AddRequest) Descriptor deprecated

func (*AddRequest) Descriptor() ([]byte, []int)

Deprecated: Use AddRequest.ProtoReflect.Descriptor instead.

func (*AddRequest) GetMetric

func (x *AddRequest) GetMetric() *Metric

func (*AddRequest) ProtoMessage

func (*AddRequest) ProtoMessage()

func (*AddRequest) ProtoReflect

func (x *AddRequest) ProtoReflect() protoreflect.Message

func (*AddRequest) Reset

func (x *AddRequest) Reset()

func (*AddRequest) String

func (x *AddRequest) String() string

type Collector

type Collector struct {
	Namespace  string        `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Subsystem  string        `protobuf:"bytes,2,opt,name=subsystem,proto3" json:"subsystem,omitempty"`
	Type       CollectorType `protobuf:"varint,3,opt,name=type,proto3,enum=metrics.v1.CollectorType" json:"type,omitempty"`
	Help       string        `protobuf:"bytes,4,opt,name=help,proto3" json:"help,omitempty"`
	Labels     []string      `protobuf:"bytes,5,rep,name=labels,proto3" json:"labels,omitempty"`
	Buckets    []float64     `protobuf:"fixed64,6,rep,packed,name=buckets,proto3" json:"buckets,omitempty"`
	Objectives []*Objective  `protobuf:"bytes,7,rep,name=objectives,proto3" json:"objectives,omitempty"`
	// contains filtered or unexported fields
}

Collector describes the shape of a single application-defined metric. Mirrors github.com/roadrunner-server/metrics/v6.Collector.

func (*Collector) Descriptor deprecated

func (*Collector) Descriptor() ([]byte, []int)

Deprecated: Use Collector.ProtoReflect.Descriptor instead.

func (*Collector) GetBuckets

func (x *Collector) GetBuckets() []float64

func (*Collector) GetHelp

func (x *Collector) GetHelp() string

func (*Collector) GetLabels

func (x *Collector) GetLabels() []string

func (*Collector) GetNamespace

func (x *Collector) GetNamespace() string

func (*Collector) GetObjectives

func (x *Collector) GetObjectives() []*Objective

func (*Collector) GetSubsystem

func (x *Collector) GetSubsystem() string

func (*Collector) GetType

func (x *Collector) GetType() CollectorType

func (*Collector) ProtoMessage

func (*Collector) ProtoMessage()

func (*Collector) ProtoReflect

func (x *Collector) ProtoReflect() protoreflect.Message

func (*Collector) Reset

func (x *Collector) Reset()

func (*Collector) String

func (x *Collector) String() string

type CollectorType

type CollectorType int32

CollectorType enumerates the supported Prometheus collector kinds. The numeric values are stable; do not reuse or renumber.

const (
	CollectorType_COLLECTOR_TYPE_UNSPECIFIED CollectorType = 0
	CollectorType_COLLECTOR_TYPE_HISTOGRAM   CollectorType = 1
	CollectorType_COLLECTOR_TYPE_GAUGE       CollectorType = 2
	CollectorType_COLLECTOR_TYPE_COUNTER     CollectorType = 3
	CollectorType_COLLECTOR_TYPE_SUMMARY     CollectorType = 4
)

func (CollectorType) Descriptor

func (CollectorType) Enum

func (x CollectorType) Enum() *CollectorType

func (CollectorType) EnumDescriptor deprecated

func (CollectorType) EnumDescriptor() ([]byte, []int)

Deprecated: Use CollectorType.Descriptor instead.

func (CollectorType) Number

func (CollectorType) String

func (x CollectorType) String() string

func (CollectorType) Type

type DeclareRequest

type DeclareRequest struct {
	Collector *NamedCollector `protobuf:"bytes,1,opt,name=collector,proto3" json:"collector,omitempty"`
	// contains filtered or unexported fields
}

func (*DeclareRequest) Descriptor deprecated

func (*DeclareRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeclareRequest.ProtoReflect.Descriptor instead.

func (*DeclareRequest) GetCollector

func (x *DeclareRequest) GetCollector() *NamedCollector

func (*DeclareRequest) ProtoMessage

func (*DeclareRequest) ProtoMessage()

func (*DeclareRequest) ProtoReflect

func (x *DeclareRequest) ProtoReflect() protoreflect.Message

func (*DeclareRequest) Reset

func (x *DeclareRequest) Reset()

func (*DeclareRequest) String

func (x *DeclareRequest) String() string

type Metric

type Metric struct {
	Name   string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Value  float64  `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"`
	Labels []string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty"`
	// contains filtered or unexported fields
}

Metric is a single observation against an already-declared collector.

func (*Metric) Descriptor deprecated

func (*Metric) Descriptor() ([]byte, []int)

Deprecated: Use Metric.ProtoReflect.Descriptor instead.

func (*Metric) GetLabels

func (x *Metric) GetLabels() []string

func (*Metric) GetName

func (x *Metric) GetName() string

func (*Metric) GetValue

func (x *Metric) GetValue() float64

func (*Metric) ProtoMessage

func (*Metric) ProtoMessage()

func (*Metric) ProtoReflect

func (x *Metric) ProtoReflect() protoreflect.Message

func (*Metric) Reset

func (x *Metric) Reset()

func (*Metric) String

func (x *Metric) String() string

type NamedCollector

type NamedCollector struct {
	Name      string     `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Collector *Collector `protobuf:"bytes,2,opt,name=collector,proto3" json:"collector,omitempty"`
	// contains filtered or unexported fields
}

NamedCollector wraps a Collector with its registry name; used only by Declare to register a new collector under that name.

func (*NamedCollector) Descriptor deprecated

func (*NamedCollector) Descriptor() ([]byte, []int)

Deprecated: Use NamedCollector.ProtoReflect.Descriptor instead.

func (*NamedCollector) GetCollector

func (x *NamedCollector) GetCollector() *Collector

func (*NamedCollector) GetName

func (x *NamedCollector) GetName() string

func (*NamedCollector) ProtoMessage

func (*NamedCollector) ProtoMessage()

func (*NamedCollector) ProtoReflect

func (x *NamedCollector) ProtoReflect() protoreflect.Message

func (*NamedCollector) Reset

func (x *NamedCollector) Reset()

func (*NamedCollector) String

func (x *NamedCollector) String() string

type Objective

type Objective struct {
	Quantile float64 `protobuf:"fixed64,1,opt,name=quantile,proto3" json:"quantile,omitempty"`
	Error    float64 `protobuf:"fixed64,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

Objective is a single (quantile, error) pair for Prometheus summary collectors. proto3 forbids float-keyed maps, so summary objectives are modelled as a repeated message rather than `map<double, double>`.

func (*Objective) Descriptor deprecated

func (*Objective) Descriptor() ([]byte, []int)

Deprecated: Use Objective.ProtoReflect.Descriptor instead.

func (*Objective) GetError

func (x *Objective) GetError() float64

func (*Objective) GetQuantile

func (x *Objective) GetQuantile() float64

func (*Objective) ProtoMessage

func (*Objective) ProtoMessage()

func (*Objective) ProtoReflect

func (x *Objective) ProtoReflect() protoreflect.Message

func (*Objective) Reset

func (x *Objective) Reset()

func (*Objective) String

func (x *Objective) String() string

type ObserveRequest

type ObserveRequest struct {
	Metric *Metric `protobuf:"bytes,1,opt,name=metric,proto3" json:"metric,omitempty"`
	// contains filtered or unexported fields
}

func (*ObserveRequest) Descriptor deprecated

func (*ObserveRequest) Descriptor() ([]byte, []int)

Deprecated: Use ObserveRequest.ProtoReflect.Descriptor instead.

func (*ObserveRequest) GetMetric

func (x *ObserveRequest) GetMetric() *Metric

func (*ObserveRequest) ProtoMessage

func (*ObserveRequest) ProtoMessage()

func (*ObserveRequest) ProtoReflect

func (x *ObserveRequest) ProtoReflect() protoreflect.Message

func (*ObserveRequest) Reset

func (x *ObserveRequest) Reset()

func (*ObserveRequest) String

func (x *ObserveRequest) String() string

type Response

type Response struct {
	Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

func (*Response) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetOk

func (x *Response) GetOk() bool

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type SetRequest

type SetRequest struct {
	Metric *Metric `protobuf:"bytes,1,opt,name=metric,proto3" json:"metric,omitempty"`
	// contains filtered or unexported fields
}

func (*SetRequest) Descriptor deprecated

func (*SetRequest) Descriptor() ([]byte, []int)

Deprecated: Use SetRequest.ProtoReflect.Descriptor instead.

func (*SetRequest) GetMetric

func (x *SetRequest) GetMetric() *Metric

func (*SetRequest) ProtoMessage

func (*SetRequest) ProtoMessage()

func (*SetRequest) ProtoReflect

func (x *SetRequest) ProtoReflect() protoreflect.Message

func (*SetRequest) Reset

func (x *SetRequest) Reset()

func (*SetRequest) String

func (x *SetRequest) String() string

type SubRequest

type SubRequest struct {
	Metric *Metric `protobuf:"bytes,1,opt,name=metric,proto3" json:"metric,omitempty"`
	// contains filtered or unexported fields
}

func (*SubRequest) Descriptor deprecated

func (*SubRequest) Descriptor() ([]byte, []int)

Deprecated: Use SubRequest.ProtoReflect.Descriptor instead.

func (*SubRequest) GetMetric

func (x *SubRequest) GetMetric() *Metric

func (*SubRequest) ProtoMessage

func (*SubRequest) ProtoMessage()

func (*SubRequest) ProtoReflect

func (x *SubRequest) ProtoReflect() protoreflect.Message

func (*SubRequest) Reset

func (x *SubRequest) Reset()

func (*SubRequest) String

func (x *SubRequest) String() string

type UnregisterRequest

type UnregisterRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*UnregisterRequest) Descriptor deprecated

func (*UnregisterRequest) Descriptor() ([]byte, []int)

Deprecated: Use UnregisterRequest.ProtoReflect.Descriptor instead.

func (*UnregisterRequest) GetName

func (x *UnregisterRequest) GetName() string

func (*UnregisterRequest) ProtoMessage

func (*UnregisterRequest) ProtoMessage()

func (*UnregisterRequest) ProtoReflect

func (x *UnregisterRequest) ProtoReflect() protoreflect.Message

func (*UnregisterRequest) Reset

func (x *UnregisterRequest) Reset()

func (*UnregisterRequest) String

func (x *UnregisterRequest) String() string

Jump to

Keyboard shortcuts

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