Documentation ¶
Index ¶
- Variables
- type Counter
- func (this *Counter[T]) CountMaps() int
- func (this *Counter[T]) GC()
- func (this *Counter[T]) Get(key uint64) T
- func (this *Counter[T]) GetKey(key string) T
- func (this *Counter[T]) Increase(key uint64, lifeSeconds int) T
- func (this *Counter[T]) IncreaseKey(key string, lifeSeconds int) T
- func (this *Counter[T]) Reset(key uint64)
- func (this *Counter[T]) ResetKey(key string)
- func (this *Counter[T]) TotalItems() int
- func (this *Counter[T]) WithGC() *Counter[T]
- type Item
- type SupportedUIntType
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Counter ¶
type Counter[T SupportedUIntType] struct { // contains filtered or unexported fields }
func (*Counter[T]) IncreaseKey ¶
IncreaseKey increase string key
type Item ¶
type Item[T SupportedUIntType] struct { // contains filtered or unexported fields }
func NewItem ¶
func NewItem[T SupportedUIntType](lifeSeconds int) Item[T]
type SupportedUIntType ¶ added in v1.3.0
Click to show internal directories.
Click to hide internal directories.