Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RecycleAccumulator ¶
type RecycleAccumulator struct {
// contains filtered or unexported fields
}
func NewAccumulator ¶
func NewAccumulator(min, max int64) (*RecycleAccumulator, error)
NewAccumulator returns a new pointer to an accumulator
func (*RecycleAccumulator) Get ¶
func (i *RecycleAccumulator) Get() int64
func (*RecycleAccumulator) Incr ¶
func (i *RecycleAccumulator) Incr() int64
Incr incremenets the accumulator by 1
func (*RecycleAccumulator) IncrN ¶
func (i *RecycleAccumulator) IncrN(N int64) int64
IncrN incremenets the accumulator by N
func (*RecycleAccumulator) Reset ¶
func (i *RecycleAccumulator) Reset() int64
Flush resets the accumulator to min
func (*RecycleAccumulator) Set ¶
func (i *RecycleAccumulator) Set(val int64) int64
type StepRecycleAccumulator ¶
type StepRecycleAccumulator struct {
// contains filtered or unexported fields
}
func NewStepRecycleAccumulator ¶
func NewStepRecycleAccumulator(min, max, stepLen int64) (*StepRecycleAccumulator, error)
NewStepAdd returns a new pointer to an StepRecycleAccumulator
func (*StepRecycleAccumulator) Get ¶
func (s *StepRecycleAccumulator) Get() int64
func (*StepRecycleAccumulator) Incr ¶
func (s *StepRecycleAccumulator) Incr() int64
Incr incremenets the StepRecycleAccumulator by 1
func (*StepRecycleAccumulator) IncrN ¶
func (s *StepRecycleAccumulator) IncrN(N int64) int64
IncrN incremenets the StepRecycleAccumulator by N
Click to show internal directories.
Click to hide internal directories.