simple

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: Apache-2.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[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func NewCache

func NewCache[K comparable, V any](size int) *Cache[K, V]

func (*Cache[K, V]) Delete

func (c *Cache[K, V]) Delete(_ context.Context, key K) error

func (*Cache[K, V]) Get

func (c *Cache[K, V]) Get(_ context.Context, key K) (V, error)

func (*Cache[K, V]) Keys

func (c *Cache[K, V]) Keys() []K

func (*Cache[K, V]) Set

func (c *Cache[K, V]) Set(_ context.Context, key K, value V) error

Jump to

Keyboard shortcuts

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