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

memory

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 4 Imported by: 0

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