 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- type Collector
- func (mc *Collector) Add(name string, value float64, labels map[string]string, ...)
- func (mc *Collector) CollectedMetrics() []metric.Operation
- func (mc *Collector) Expire(group string)
- func (mc *Collector) Inc(name string, labels map[string]string, opts ...pkg.MetricCollectorOption)
- func (mc *Collector) Set(name string, value float64, labels map[string]string, ...)
- func (mc *Collector) WithDefaultGroup(group string)
- func (mc *Collector) WriteOutput(w io.Writer) error
 
- type MetricsCollectorOption
- type MetricsCollectorOptionApplier
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector struct {
	// contains filtered or unexported fields
}
    func NewCollector ¶
func NewCollector(opts ...MetricsCollectorOption) *Collector
func (*Collector) Add ¶
func (mc *Collector) Add(name string, value float64, labels map[string]string, options ...pkg.MetricCollectorOption)
Add adds custom value for Counter metric
func (*Collector) CollectedMetrics ¶
func (*Collector) Set ¶
func (mc *Collector) Set(name string, value float64, labels map[string]string, options ...pkg.MetricCollectorOption)
Set specifies custom value for Gauge metric
func (*Collector) WithDefaultGroup ¶
type MetricsCollectorOption ¶
type MetricsCollectorOption interface {
	Apply(op MetricsCollectorOptionApplier)
}
    type MetricsCollectorOptionApplier ¶
type MetricsCollectorOptionApplier interface {
	WithDefaultGroup(group string)
}
    type Option ¶
type Option func(o MetricsCollectorOptionApplier)
func WithDefaultGroup ¶
func (Option) Apply ¶
func (opt Option) Apply(o MetricsCollectorOptionApplier)
 Click to show internal directories. 
   Click to hide internal directories.