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 ¶ added in v0.10.0
func (*Counter) DecrementValueAndRead ¶ added in v0.16.0
DecrementValueAndRead decrements counter by given value and returns the new value (thread-safe).
func (*Counter) IncrementValueAndRead ¶ added in v0.16.0
IncrementValueAndRead increments counter by given value and returns the new value (thread-safe).
Click to show internal directories.
Click to hide internal directories.