Categorygithub.com/tiny-go/timap
modulepackage
1.2.0
Repository: https://github.com/tiny-go/timap.git
Documentation: pkg.go.dev

# README

Timap

Report Card GoCover

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 is a Timap constructor func.
NewCtxMap create a new map that stores key/value pairs with provided context.

# Interfaces

CtxMap stores provided key/value pairs with context.
Timap represents "time map", it is a wrapper over sync.Map that allows to store key-value pairs for certain period of time.