Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNilSender = errors.New("sender is nil") ErrTransportInactive = errors.New("transport is not running") ErrCollectorInactive = errors.New("collector is not running") )
View Source
var ( DefaultLogger = &defaultLogger{} NilLogger = &nilLogger{} )
Functions ¶
func StoppableFinalizer ¶
func StoppableFinalizer(s Stoppable)
Types ¶
type Collector ¶
type Collector interface {
Metrics() []Metric
}
Collector return list of collected metrics.
type ErrorLogger ¶
type ErrorLogger interface {
Errorf(format string, args ...interface{})
}
ErrorLogger can be used to output errors.
type MemoryCollector ¶
type MemoryCollector struct {
// contains filtered or unexported fields
}
MemoryCollector collects information about memory usage and goroutines count.
func NewMemoryCollector ¶
func NewMemoryCollector(interval uint64) *MemoryCollector
NewMemoryCollector creates new instance of AppCollector.
func (*MemoryCollector) Metrics ¶
func (c *MemoryCollector) Metrics() []Metric
Metrics fetches and clears metrics.
type Stoppable ¶
type Stoppable interface {
Stop() error
}
Stoppable represents any type with Stop method that can return an error.
Click to show internal directories.
Click to hide internal directories.