Documentation ¶
Index ¶
- Variables
- type Counter
- func (*Counter) Descriptor() ([]byte, []int)
- func (m *Counter) GetValue() float64
- func (m *Counter) Marshal() (dAtA []byte, err error)
- func (m *Counter) MarshalTo(dAtA []byte) (int, error)
- func (m *Counter) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Counter) ProtoMessage()
- func (m *Counter) Reset()
- func (m *Counter) Size() (n int)
- func (m *Counter) String() string
- func (m *Counter) Unmarshal(dAtA []byte) error
- func (m *Counter) XXX_DiscardUnknown()
- func (m *Counter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Counter) XXX_Merge(src proto.Message)
- func (m *Counter) XXX_Size() int
- func (m *Counter) XXX_Unmarshal(b []byte) error
- type Gauge
- func (*Gauge) Descriptor() ([]byte, []int)
- func (m *Gauge) GetValue() float64
- func (m *Gauge) Marshal() (dAtA []byte, err error)
- func (m *Gauge) MarshalTo(dAtA []byte) (int, error)
- func (m *Gauge) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Gauge) ProtoMessage()
- func (m *Gauge) Reset()
- func (m *Gauge) Size() (n int)
- func (m *Gauge) String() string
- func (m *Gauge) Unmarshal(dAtA []byte) error
- func (m *Gauge) XXX_DiscardUnknown()
- func (m *Gauge) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Gauge) XXX_Merge(src proto.Message)
- func (m *Gauge) XXX_Size() int
- func (m *Gauge) XXX_Unmarshal(b []byte) error
- type LabelPair
- func (*LabelPair) Descriptor() ([]byte, []int)
- func (m *LabelPair) GetName() string
- func (m *LabelPair) GetValue() string
- func (m *LabelPair) Marshal() (dAtA []byte, err error)
- func (m *LabelPair) MarshalTo(dAtA []byte) (int, error)
- func (m *LabelPair) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LabelPair) ProtoMessage()
- func (m *LabelPair) Reset()
- func (m *LabelPair) Size() (n int)
- func (m *LabelPair) String() string
- func (m *LabelPair) Unmarshal(dAtA []byte) error
- func (m *LabelPair) XXX_DiscardUnknown()
- func (m *LabelPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LabelPair) XXX_Merge(src proto.Message)
- func (m *LabelPair) XXX_Size() int
- func (m *LabelPair) XXX_Unmarshal(b []byte) error
- type Metric
- func (*Metric) Descriptor() ([]byte, []int)
- func (m *Metric) GetCollecttime() int64
- func (m *Metric) GetCounter() *Counter
- func (m *Metric) GetGauge() *Gauge
- func (m *Metric) GetLabel() []*LabelPair
- func (m *Metric) GetRawHist() *RawHist
- func (m *Metric) Marshal() (dAtA []byte, err error)
- func (m *Metric) MarshalTo(dAtA []byte) (int, error)
- func (m *Metric) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Metric) ProtoMessage()
- func (m *Metric) Reset()
- func (m *Metric) Size() (n int)
- func (m *Metric) String() string
- func (m *Metric) Unmarshal(dAtA []byte) error
- func (m *Metric) XXX_DiscardUnknown()
- func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Metric) XXX_Merge(src proto.Message)
- func (m *Metric) XXX_Size() int
- func (m *Metric) XXX_Unmarshal(b []byte) error
- type MetricFamily
- func (*MetricFamily) Descriptor() ([]byte, []int)
- func (m *MetricFamily) GetHelp() string
- func (m *MetricFamily) GetMetric() []*Metric
- func (m *MetricFamily) GetName() string
- func (m *MetricFamily) GetNode() string
- func (m *MetricFamily) GetRole() string
- func (m *MetricFamily) GetType() MetricType
- func (m *MetricFamily) Marshal() (dAtA []byte, err error)
- func (m *MetricFamily) MarshalTo(dAtA []byte) (int, error)
- func (m *MetricFamily) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MetricFamily) ProtoMessage()
- func (m *MetricFamily) Reset()
- func (m *MetricFamily) Size() (n int)
- func (m *MetricFamily) String() string
- func (m *MetricFamily) Unmarshal(dAtA []byte) error
- func (m *MetricFamily) XXX_DiscardUnknown()
- func (m *MetricFamily) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MetricFamily) XXX_Merge(src proto.Message)
- func (m *MetricFamily) XXX_Size() int
- func (m *MetricFamily) XXX_Unmarshal(b []byte) error
- type MetricType
- type RawHist
- func (*RawHist) Descriptor() ([]byte, []int)
- func (m *RawHist) GetSamples() []*Sample
- func (m *RawHist) Marshal() (dAtA []byte, err error)
- func (m *RawHist) MarshalTo(dAtA []byte) (int, error)
- func (m *RawHist) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RawHist) ProtoMessage()
- func (m *RawHist) Reset()
- func (m *RawHist) Size() (n int)
- func (m *RawHist) String() string
- func (m *RawHist) Unmarshal(dAtA []byte) error
- func (m *RawHist) XXX_DiscardUnknown()
- func (m *RawHist) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RawHist) XXX_Merge(src proto.Message)
- func (m *RawHist) XXX_Size() int
- func (m *RawHist) XXX_Unmarshal(b []byte) error
- type Sample
- func (*Sample) Descriptor() ([]byte, []int)
- func (m *Sample) GetDatetime() int64
- func (m *Sample) GetValue() float64
- func (m *Sample) Marshal() (dAtA []byte, err error)
- func (m *Sample) MarshalTo(dAtA []byte) (int, error)
- func (m *Sample) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Sample) ProtoMessage()
- func (m *Sample) Reset()
- func (m *Sample) Size() (n int)
- func (m *Sample) String() string
- func (m *Sample) Unmarshal(dAtA []byte) error
- func (m *Sample) XXX_DiscardUnknown()
- func (m *Sample) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Sample) XXX_Merge(src proto.Message)
- func (m *Sample) XXX_Size() int
- func (m *Sample) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthMetric = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMetric = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupMetric = fmt.Errorf("proto: unexpected end of group") )
View Source
var MetricType_name = map[int32]string{
0: "COUNTER",
1: "GAUGE",
2: "RAWHIST",
}
View Source
var MetricType_value = map[string]int32{
"COUNTER": 0,
"GAUGE": 1,
"RAWHIST": 2,
}
Functions ¶
This section is empty.
Types ¶
type Counter ¶
type Counter struct { Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Counter) Descriptor ¶
func (*Counter) MarshalToSizedBuffer ¶
func (*Counter) ProtoMessage ¶
func (*Counter) ProtoMessage()
func (*Counter) XXX_DiscardUnknown ¶
func (m *Counter) XXX_DiscardUnknown()
func (*Counter) XXX_Marshal ¶
func (*Counter) XXX_Unmarshal ¶
type Gauge ¶
type Gauge struct { Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Gauge) Descriptor ¶
func (*Gauge) ProtoMessage ¶
func (*Gauge) ProtoMessage()
func (*Gauge) XXX_DiscardUnknown ¶
func (m *Gauge) XXX_DiscardUnknown()
func (*Gauge) XXX_Marshal ¶
func (*Gauge) XXX_Unmarshal ¶
type LabelPair ¶
type LabelPair struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func P2MLabelPairs ¶
func (*LabelPair) Descriptor ¶
func (*LabelPair) MarshalToSizedBuffer ¶
func (*LabelPair) ProtoMessage ¶
func (*LabelPair) ProtoMessage()
func (*LabelPair) XXX_DiscardUnknown ¶
func (m *LabelPair) XXX_DiscardUnknown()
func (*LabelPair) XXX_Marshal ¶
func (*LabelPair) XXX_Unmarshal ¶
type Metric ¶
type Metric struct { Label []*LabelPair `protobuf:"bytes,1,rep,name=label,proto3" json:"label,omitempty"` Gauge *Gauge `protobuf:"bytes,2,opt,name=gauge,proto3" json:"gauge,omitempty"` Counter *Counter `protobuf:"bytes,3,opt,name=counter,proto3" json:"counter,omitempty"` RawHist *RawHist `protobuf:"bytes,4,opt,name=rawHist,proto3" json:"rawHist,omitempty"` Collecttime int64 `protobuf:"varint,5,opt,name=collecttime,proto3" json:"collecttime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func P2MCounters ¶
func (*Metric) Descriptor ¶
func (*Metric) GetCollecttime ¶
func (*Metric) GetCounter ¶
func (*Metric) GetRawHist ¶
func (*Metric) MarshalToSizedBuffer ¶
func (*Metric) ProtoMessage ¶
func (*Metric) ProtoMessage()
func (*Metric) XXX_DiscardUnknown ¶
func (m *Metric) XXX_DiscardUnknown()
func (*Metric) XXX_Marshal ¶
func (*Metric) XXX_Unmarshal ¶
type MetricFamily ¶
type MetricFamily struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Help string `protobuf:"bytes,2,opt,name=help,proto3" json:"help,omitempty"` Type MetricType `protobuf:"varint,3,opt,name=type,proto3,enum=metric.MetricType" json:"type,omitempty"` Metric []*Metric `protobuf:"bytes,4,rep,name=metric,proto3" json:"metric,omitempty"` Node string `protobuf:"bytes,5,opt,name=node,proto3" json:"node,omitempty"` Role string `protobuf:"bytes,6,opt,name=role,proto3" json:"role,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func P2MMetricFamilies ¶
func P2MMetricFamilies(mfs []*dto.MetricFamily) []*MetricFamily
func (*MetricFamily) Descriptor ¶
func (*MetricFamily) Descriptor() ([]byte, []int)
func (*MetricFamily) GetHelp ¶
func (m *MetricFamily) GetHelp() string
func (*MetricFamily) GetMetric ¶
func (m *MetricFamily) GetMetric() []*Metric
func (*MetricFamily) GetName ¶
func (m *MetricFamily) GetName() string
func (*MetricFamily) GetNode ¶
func (m *MetricFamily) GetNode() string
func (*MetricFamily) GetRole ¶
func (m *MetricFamily) GetRole() string
func (*MetricFamily) GetType ¶
func (m *MetricFamily) GetType() MetricType
func (*MetricFamily) Marshal ¶
func (m *MetricFamily) Marshal() (dAtA []byte, err error)
func (*MetricFamily) MarshalToSizedBuffer ¶
func (m *MetricFamily) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MetricFamily) ProtoMessage ¶
func (*MetricFamily) ProtoMessage()
func (*MetricFamily) Reset ¶
func (m *MetricFamily) Reset()
func (*MetricFamily) Size ¶
func (m *MetricFamily) Size() (n int)
func (*MetricFamily) String ¶
func (m *MetricFamily) String() string
func (*MetricFamily) Unmarshal ¶
func (m *MetricFamily) Unmarshal(dAtA []byte) error
func (*MetricFamily) XXX_DiscardUnknown ¶
func (m *MetricFamily) XXX_DiscardUnknown()
func (*MetricFamily) XXX_Marshal ¶
func (m *MetricFamily) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MetricFamily) XXX_Merge ¶
func (m *MetricFamily) XXX_Merge(src proto.Message)
func (*MetricFamily) XXX_Size ¶
func (m *MetricFamily) XXX_Size() int
func (*MetricFamily) XXX_Unmarshal ¶
func (m *MetricFamily) XXX_Unmarshal(b []byte) error
type MetricType ¶
type MetricType int32
const ( MetricType_COUNTER MetricType = 0 MetricType_GAUGE MetricType = 1 MetricType_RAWHIST MetricType = 2 )
func (MetricType) EnumDescriptor ¶
func (MetricType) EnumDescriptor() ([]byte, []int)
func (MetricType) String ¶
func (x MetricType) String() string
type RawHist ¶
type RawHist struct { Samples []*Sample `protobuf:"bytes,1,rep,name=samples,proto3" json:"samples,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RawHist) Descriptor ¶
func (*RawHist) GetSamples ¶
func (*RawHist) MarshalToSizedBuffer ¶
func (*RawHist) ProtoMessage ¶
func (*RawHist) ProtoMessage()
func (*RawHist) XXX_DiscardUnknown ¶
func (m *RawHist) XXX_DiscardUnknown()
func (*RawHist) XXX_Marshal ¶
func (*RawHist) XXX_Unmarshal ¶
type Sample ¶
type Sample struct { Datetime int64 `protobuf:"varint,1,opt,name=datetime,proto3" json:"datetime,omitempty"` Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Sample) Descriptor ¶
func (*Sample) GetDatetime ¶
func (*Sample) MarshalToSizedBuffer ¶
func (*Sample) ProtoMessage ¶
func (*Sample) ProtoMessage()
func (*Sample) XXX_DiscardUnknown ¶
func (m *Sample) XXX_DiscardUnknown()
func (*Sample) XXX_Marshal ¶
func (*Sample) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.