cache

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewCache

func NewCache(maxItems int) *Cache

func (*Cache) Get

func (c *Cache) Get(key any) (any, error)

func (*Cache) Set

func (c *Cache) Set(key, val any)

type ErrKeyNotFound

type ErrKeyNotFound struct {
	// contains filtered or unexported fields
}

func NewKeyNotFound

func NewKeyNotFound(error error) *ErrKeyNotFound

func (*ErrKeyNotFound) Error

func (n *ErrKeyNotFound) Error() string

Jump to

Keyboard shortcuts

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