diff --git a/lib/monitoring/counter.go b/lib/monitoring/counter.go index 17d4e8972..6c8744014 100644 --- a/lib/monitoring/counter.go +++ b/lib/monitoring/counter.go @@ -24,14 +24,17 @@ func (c *Counter) String() string { return strconv.FormatInt(c.i.Load(), 10) } +// Add adds given delta to a counter value func (c *Counter) Add(delta int64) { c.i.Add(delta) } +// Set sets given value as counter value func (c *Counter) Set(value int64) { c.i.Store(value) } +// Get returns counter value func (c *Counter) Get() int64 { return c.i.Load() }