mem

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

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 the memory store type

func New

func New() *Store

New creates a memory-backed session store

func (*Store) Get

func (s *Store) Get(clientID string) (*entities.Session, error)

Get returns a session from the store for the specified client

func (*Store) GetAll

func (s *Store) GetAll() ([]*entities.Session, error)

GetAll returns all sessions. This returns nil for the memory store

func (*Store) Iterate

func (s *Store) Iterate(fn session.IterateFn) error

Iterate iterates over the sessions in the store

func (*Store) Remove

func (s *Store) Remove(clientID string) error

Remove removes a session from the store

func (*Store) Set

func (s *Store) Set(session *entities.Session) error

Set sets a new session in the store

func (*Store) SetSessionExpiry

func (s *Store) SetSessionExpiry(clientID string, expiry uint32) error

SetSessionExpiry sets the expiration time for the sessions

Jump to

Keyboard shortcuts

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