//
pkg.gl
Category
github.com/tiny-go/timap
module
package
1.2.0
Repository:
https://github.com/tiny-go/timap.git
Documentation:
pkg.go.dev
Overview
Versions
1
Dependencies
4
Dependents
1
Files
140 SLOC
#
README
Timap
Different map implementations
Timap
is a wrapper over
sync.Map
that allows to set life time for each key-value pair.
CtxMap
allows storing key/value pairs with context to be deleted once the context is cancelled or its deadline is exceeded.
#
Functions
New
New is a Timap constructor func.
NewCtxMap
NewCtxMap create a new map that stores key/value pairs with provided context.
#
Interfaces
CtxMap
CtxMap stores provided key/value pairs with context.
Timap
Timap represents "time map", it is a wrapper over sync.Map that allows to store key-value pairs for certain period of time.