Documentation ¶
Index ¶
- type Counter
- func (c *Counter) Decrement(x ...uint64) error
- func (c *Counter) DecrementValueAndRead(x uint64) (uint64, error)
- func (c *Counter) Format(f fmt.State, r rune)
- func (c *Counter) Get() uint64
- func (c *Counter) Increment(x ...uint64) error
- func (c *Counter) IncrementValueAndRead(x uint64) (uint64, error)
- func (c *Counter) Set(value uint64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
func NewCounter ¶
func (*Counter) DecrementValueAndRead ¶
DecrementValueAndRead decrements counter by given value and returns the new value (thread-safe).
func (*Counter) IncrementValueAndRead ¶
IncrementValueAndRead increments counter by given value and returns the new value (thread-safe).
Click to show internal directories.
Click to hide internal directories.