memory

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	Value  any
	Expiry int64
}

type Memory

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

func New

func New(cleanupInterval time.Duration) *Memory

func (*Memory) Close

func (m *Memory) Close()

func (*Memory) Delete

func (m *Memory) Delete(key string)

func (*Memory) Get

func (m *Memory) Get(key string) any

func (*Memory) Len

func (m *Memory) Len() int

func (*Memory) Set

func (m *Memory) Set(key string, value any, ttl time.Duration)

Jump to

Keyboard shortcuts

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