Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SafeCounter ¶
type SafeCounter struct {
// contains filtered or unexported fields
}
SafeCounter is safe to use concurrently.
func NewSafeCounter ¶
func NewSafeCounter() SafeCounter
func (*SafeCounter) Inc ¶
func (c *SafeCounter) Inc(key string)
Inc increments the counter for the given key.
func (*SafeCounter) Value ¶
func (c *SafeCounter) Value(key string) int
Value returns the current value of the counter for the given key.
Click to show internal directories.
Click to hide internal directories.