Documentation ¶
Index ¶
- type Buckets
- type Counter
- type CounterOpts
- type CounterVector
- type Description
- type Gauge
- func (gauge *Gauge) Add(value float64)
- func (gauge *Gauge) Dec()
- func (gauge *Gauge) Description() *Description
- func (gauge *Gauge) Get() float64
- func (gauge *Gauge) Inc()
- func (gauge *Gauge) JsonData() any
- func (gauge *Gauge) Reset()
- func (gauge *Gauge) Set(value float64)
- func (gauge *Gauge) Sub(value float64)
- func (gauge *Gauge) Write(writer io.Writer)
- type GaugeOpts
- type GaugeVector
- type Handler
- type Histogram
- type HistogramJsonDataItem
- type HistogramOpts
- type HistogramVector
- type JsonHandler
- type Label
- type LabelOpts
- type LabelVector
- type Labels
- type Metric
- type MetricJsonData
- type MetricVector
- type MetricVectorJsonData
- type Registry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
func NewCounter ¶
func NewCounter(opts CounterOpts) *Counter
func (*Counter) Description ¶
func (counter *Counter) Description() *Description
type CounterOpts ¶
type CounterVector ¶
type CounterVector struct { *MetricVector[*Counter] // contains filtered or unexported fields }
func NewCounterVector ¶
func NewCounterVector(opts CounterOpts, labels ...string) *CounterVector
func (*CounterVector) Description ¶
func (counterVector *CounterVector) Description() *Description
func (*CounterVector) JsonData ¶
func (counterVector *CounterVector) JsonData() any
func (*CounterVector) Reset ¶
func (counterVector *CounterVector) Reset()
func (*CounterVector) Write ¶
func (counterVector *CounterVector) Write(writer io.Writer)
type Description ¶
type Gauge ¶
type Gauge struct {
// contains filtered or unexported fields
}
func (*Gauge) Description ¶
func (gauge *Gauge) Description() *Description
type GaugeVector ¶
type GaugeVector struct { *MetricVector[*Gauge] // contains filtered or unexported fields }
func NewGaugeVector ¶
func NewGaugeVector(opts GaugeOpts, labels ...string) *GaugeVector
func (*GaugeVector) Description ¶
func (gaugeVector *GaugeVector) Description() *Description
func (*GaugeVector) JsonData ¶
func (gaugeVector *GaugeVector) JsonData() any
func (*GaugeVector) Reset ¶
func (gaugeVector *GaugeVector) Reset()
func (*GaugeVector) Write ¶
func (gaugeVector *GaugeVector) Write(writer io.Writer)
type Histogram ¶
type Histogram struct {
// contains filtered or unexported fields
}
func NewHistogram ¶
func NewHistogram(opts HistogramOpts) *Histogram
func (*Histogram) Description ¶
func (histogram *Histogram) Description() *Description
type HistogramJsonDataItem ¶
type HistogramOpts ¶
type HistogramVector ¶
type HistogramVector struct { *MetricVector[*Histogram] // contains filtered or unexported fields }
func NewHistogramVector ¶
func NewHistogramVector(opts HistogramOpts, labels ...string) *HistogramVector
func (*HistogramVector) Description ¶
func (histogramVector *HistogramVector) Description() *Description
func (*HistogramVector) JsonData ¶
func (histogramVector *HistogramVector) JsonData() any
func (*HistogramVector) Reset ¶
func (histogramVector *HistogramVector) Reset()
func (*HistogramVector) Write ¶
func (histogramVector *HistogramVector) Write(writer io.Writer)
type JsonHandler ¶
type JsonHandler struct {
// contains filtered or unexported fields
}
func (JsonHandler) ServeHTTP ¶
func (handler JsonHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)
type Label ¶
type Label struct {
// contains filtered or unexported fields
}
func (*Label) Description ¶
func (label *Label) Description() *Description
type LabelVector ¶
type LabelVector struct { *MetricVector[*Label] // contains filtered or unexported fields }
func NewLabelVector ¶
func NewLabelVector(opts LabelOpts, labels ...string) *LabelVector
func (*LabelVector) Description ¶
func (labelVector *LabelVector) Description() *Description
func (*LabelVector) JsonData ¶
func (labelVector *LabelVector) JsonData() any
func (*LabelVector) Reset ¶
func (labelVector *LabelVector) Reset()
func (*LabelVector) Write ¶
func (labelVector *LabelVector) Write(writer io.Writer)
type Metric ¶
type Metric interface { Description() *Description Write(io.Writer) JsonData() any Reset() }
type MetricJsonData ¶
type MetricJsonData struct { Description Description `json:"description"` Data any `json:"data"` }
type MetricVector ¶
func NewMetricVector ¶
func NewMetricVector[T Metric](defaultConsctructor func() T, labels ...string) *MetricVector[T]
func (*MetricVector[T]) With ¶
func (metricVector *MetricVector[T]) With(labels Labels) T
func (*MetricVector[T]) WithLabelValues ¶
func (metricVector *MetricVector[T]) WithLabelValues(labels ...string) T
type MetricVectorJsonData ¶
type MetricVectorJsonData struct { Description Description `json:"description"` Labels []string `json:"labels"` Data any `json:"data"` }
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) JsonHandler ¶
func (registry *Registry) JsonHandler() JsonHandler
Click to show internal directories.
Click to hide internal directories.