Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FloatCounter32 ¶
FloatCounter32 - count by increment from a starting value and return the new value along the way.
func FloatCounter64 ¶
FloatCounter64 - count by increment from a starting value and return the new value along the way.
func IntegerCounter ¶
IntegerCounter - count by increment from a starting value and return the new value along the way.
Types ¶
type Conditional ¶
type Conditional struct {
// contains filtered or unexported fields
}
Conditional - tracks the conditional count.
func (*Conditional) Decrement ¶
func (counter *Conditional) Decrement() (int, error)
Decrement - Decrement unconditionally to floor (0)
func (*Conditional) DecrementIf ¶
func (counter *Conditional) DecrementIf(ok bool) (v int, err error)
DecrementIf - decrement to floor (0) if true otherwise return -1
func (*Conditional) Increment ¶
func (counter *Conditional) Increment() (v int, err error)
Increment - Increment value
func (*Conditional) IncrementIf ¶
func (counter *Conditional) IncrementIf(ok bool) (v int, err error)
IncrementIf - increment if ok is true otherwise return -1
func (*Conditional) Value ¶
func (counter *Conditional) Value() int
Value - return the current value of the counter
Source Files ¶
Click to show internal directories.
Click to hide internal directories.