mimaps

package module
v0.0.0-...-f50416a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2022 License: MIT Imports: 3 Imported by: 1

README

mimaps

Coverage Golang Maps with some extra sauce

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidKey = fmt.Errorf("key not found")
)

Errors raised by package mimaps.

Functions

This section is empty.

Types

type InMemoryCache

type InMemoryCache[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func NewInMemoryCache

func NewInMemoryCache[K comparable, V any](expire int64) InMemoryCache[K, V]

func (*InMemoryCache[K, V]) Delete

func (e *InMemoryCache[K, V]) Delete(key K) error

func (*InMemoryCache[K, V]) Get

func (e *InMemoryCache[K, V]) Get(key K) (V, error)

func (*InMemoryCache[K, V]) Put

func (e *InMemoryCache[K, V]) Put(key K, value V) error

type MiMap

type MiMap[K comparable, V any] interface {
	Put(K, V) error
	Get(K) (V, error)
	Delete(K) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL