Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetricPool ¶
type MetricPool interface {
// Get is used to retrieve the metric instance from the pool.
Get(name string) libmet.Metric
// Add is used to register the metric instance into the pool.
Add(metric libmet.Metric) error
// Set is used to replace the metric instance into the pool.
Set(key string, metric libmet.Metric)
// Del is used to remove the metric instance into the pool.
Del(key string)
// List retrieve a slice of metrics' name registered into the pool.
List() []string
// Walk run the given function for each stored item into the pool.
// If the function return false, the process is stopped.
Walk(fct FuncWalk, limit ...string) bool
}
func New ¶
func New(ctx libctx.FuncContext) MetricPool
Click to show internal directories.
Click to hide internal directories.