Help us shape the future of Go! Take the 2026 Go Developer Survey

memory

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadMemory

func LoadMemory(ctx context.Context, db *sql.DB, key string, dest any) error

LoadMemory loads a JSON memory blob from the database into dest (must be a pointer).

func LoadWeightMemory

func LoadWeightMemory(ctx context.Context, db *sql.DB, key string) (*sync.Map, error)

func SaveMemory

func SaveMemory(ctx context.Context, db *sql.DB, key string, src any) error

SaveMemory saves a Go struct as JSON into the database.

func SaveWeightMemory

func SaveWeightMemory(ctx context.Context, db *sql.DB, key string, wm *sync.Map) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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