meter: add Unregister metric
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -59,6 +59,8 @@ type Meter interface {
|
|||||||
Options() Options
|
Options() Options
|
||||||
// String return meter type
|
// String return meter type
|
||||||
String() string
|
String() string
|
||||||
|
// Unregister metric name and drop all data
|
||||||
|
Unregister(name string, labels ...string) bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// Counter is a counter
|
// Counter is a counter
|
||||||
|
|||||||
@@ -28,6 +28,10 @@ func (r *noopMeter) Name() string {
|
|||||||
return r.opts.Name
|
return r.opts.Name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r *noopMeter) Unregister(name string, labels ...string) bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
// Init initialize options
|
// Init initialize options
|
||||||
func (r *noopMeter) Init(opts ...Option) error {
|
func (r *noopMeter) Init(opts ...Option) error {
|
||||||
for _, o := range opts {
|
for _, o := range opts {
|
||||||
|
|||||||
Reference in New Issue
Block a user