memory

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package memory provides a store.Store that keeps the sessions in memory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store is a store.Store that keeps the sessions in memory. The sessions are neither shared nor persisted, so it is only suited to a single instance.

func NewStore

func NewStore() *Store

NewStore returns an empty Store.

func (*Store) Create

func (s *Store) Create(_ context.Context, id string, r store.Record) error

Create implements store.Store.

func (*Store) Delete

func (s *Store) Delete(_ context.Context, id string) error

Delete implements store.Store.

func (*Store) DeleteBy

func (s *Store) DeleteBy(_ context.Context, partition, subject, sid string) (map[string]store.Record, error)

DeleteBy implements store.Store.

func (*Store) Load

func (s *Store) Load(_ context.Context, id string) (store.Record, error)

Load implements store.Store.

func (*Store) Update

func (s *Store) Update(_ context.Context, id string, r store.Record) error

Update implements store.Store.

Jump to

Keyboard shortcuts

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