desc

package
v0.4.2-rc2 Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pkg_metrics_desc_desc_proto protoreflect.FileDescriptor

Functions

func CloneLabelPairs

func CloneLabelPairs(pairs []*dto.LabelPair) []*dto.LabelPair

Types

type Desc

type Desc struct {
	FQName          string           `protobuf:"bytes,1,opt,name=FQName,proto3" json:"FQName,omitempty"`
	Help            string           `protobuf:"bytes,2,opt,name=Help,proto3" json:"Help,omitempty"`
	ConstLabelPairs []*_go.LabelPair `protobuf:"bytes,3,rep,name=ConstLabelPairs,proto3" json:"ConstLabelPairs,omitempty"`
	VariableLabels  []string         `protobuf:"bytes,4,rep,name=VariableLabels,proto3" json:"VariableLabels,omitempty"`
	ID              uint64           `protobuf:"varint,5,opt,name=ID,proto3" json:"ID,omitempty"`
	DimHash         uint64           `protobuf:"varint,6,opt,name=DimHash,proto3" json:"DimHash,omitempty"`
	XPadding1       uint64           `protobuf:"fixed64,7,opt,name=_padding1,json=Padding1,proto3" json:"_padding1,omitempty"`
	XPadding2       uint64           `protobuf:"fixed64,8,opt,name=_padding2,json=Padding2,proto3" json:"_padding2,omitempty"`
	// contains filtered or unexported fields
}

func FromPrometheusDesc

func FromPrometheusDesc(desc *prometheus.Desc) *Desc

FromPrometheusDesc returns a prometheus.Desc reinterpreted as a desc.Desc. This function performs a shallow-copy, so it may not be safe to use the original object afterwards.

func (*Desc) Descriptor deprecated

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

Deprecated: Use Desc.ProtoReflect.Descriptor instead.

func (*Desc) GetConstLabelPairs

func (x *Desc) GetConstLabelPairs() []*_go.LabelPair

func (*Desc) GetDimHash

func (x *Desc) GetDimHash() uint64

func (*Desc) GetFQName

func (x *Desc) GetFQName() string

func (*Desc) GetHelp

func (x *Desc) GetHelp() string

func (*Desc) GetID

func (x *Desc) GetID() uint64

func (*Desc) GetVariableLabels

func (x *Desc) GetVariableLabels() []string

func (*Desc) GetXPadding1

func (x *Desc) GetXPadding1() uint64

func (*Desc) GetXPadding2

func (x *Desc) GetXPadding2() uint64

func (*Desc) ProtoMessage

func (*Desc) ProtoMessage()

func (*Desc) ProtoReflect

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

func (*Desc) Reset

func (x *Desc) Reset()

func (*Desc) String

func (x *Desc) String() string

func (*Desc) ToPrometheusDesc

func (d *Desc) ToPrometheusDesc() *prometheus.Desc

ToPrometheusDesc converts a deep-copy of a desc.Desc to a prometheus.Desc. It is safe to use the original object after calling this function.

func (*Desc) ToPrometheusDescUnsafe

func (d *Desc) ToPrometheusDescUnsafe() *prometheus.Desc

ToPrometheusDescUnsafe returns a desc.Desc reinterpreted as a prometheus.Desc. It is *not* safe to use the original object after calling this function.

Jump to

Keyboard shortcuts

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