Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOrRegister ¶
func GetOrRegister(name string, i interface{}) interface{}
Gets an existing metric or creates and registers a new one. Threadsafe alternative to calling Get and Register on failure.
Types ¶
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
A Counter is a thread-safe counter implementation
func NewCounter ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
var DefaultRegistry *Registry = NewRegistry()
func (*Registry) GetOrRegister ¶
Click to show internal directories.
Click to hide internal directories.