sessionstore

package
v0.0.0-...-b598ae0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2019 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const TABLE = "sessions"

Variables

This section is empty.

Functions

func GetId

func GetId(info *pb.Session) uint64

Types

type Store

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

func New

func New(ctx context.Context, size int, expireAt time.Duration, self libp2pPeer.ID, path string, mapper mapperFunc) (*Store, error)

func (*Store) Contains

func (s *Store) Contains(sessionId uint64) bool

func (*Store) FindAll

func (s *Store) FindAll() (result []*pb.Session, err error)

func (*Store) FindByDetails

func (s *Store) FindByDetails(key, value string) (result []*pb.Session, err error)

func (*Store) FindByPeerId

func (s *Store) FindByPeerId(peerId string) (result []*pb.Session, err error)

func (*Store) FindSessionId

func (s *Store) FindSessionId(sessionId uint64) (*pb.Session, error)

func (*Store) Insert

func (s *Store) Insert(info *pb.Session) (uint64, error)

Do not call this directly. setSessionIdToType needs to be called as well!

func (*Store) IsEmpty

func (s *Store) IsEmpty() bool

func (*Store) IsExternalSession

func (s *Store) IsExternalSession(sessionId uint64) bool

func (*Store) IsNewer

func (s *Store) IsNewer(info *pb.Session) bool

func (*Store) Len

func (s *Store) Len() int

func (*Store) Remove

func (s *Store) Remove(sessionId uint64) error

func (*Store) Save

func (s *Store) Save()

func (*Store) SessionIds

func (s *Store) SessionIds() []interface{}

Jump to

Keyboard shortcuts

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