Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultRegistry = NewRegistry()
DefaultRegistry will be used to register all the MO Dev Stats.
Functions ¶
func Register ¶
Register registers stats family to default stats registry familyName is a unique family name for the stats opts can contain logExporter etc. for the stats. Usage: stats.Register("FamilyName", stats.WithLogExporter(customStatsLogExporter))
func Unregister ¶
func Unregister(familyName string)
Unregister unregisters the family from DefaultRegistry.
Types ¶
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
Counter represents a combination of global & current_window counter.
type Family ¶
type Family struct {
// contains filtered or unexported fields
}
Family contains attributed related to a DevStats Family. Currently, it only has LogExporter
type LogExporter ¶
type Options ¶
type Options func(*options)
func WithLogExporter ¶
func WithLogExporter(logExporter LogExporter) Options
WithLogExporter registers Family with the LogExporter
type Registry ¶
Registry holds mapping between FamilyName and Family
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) Unregister ¶
Unregister deletes the item with familyName from map.