session_manager

package
v0.0.0-...-f3f2e40 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SessionManager

type SessionManager struct {
	sync.Mutex
	// contains filtered or unexported fields
}

SessionManager manages TLSNotary sessions from multiple users. When a user sends a request, SessionManager extracts the unique id of the user from the request, and calls the matching session.

func (*SessionManager) AddSession

func (sm *SessionManager) AddSession(key string) *session.Session

addSession creates a new session and sets its creation time

func (*SessionManager) GetMethod

func (sm *SessionManager) GetMethod(methodStr string, key string) method

GetMethod looks up and return Session's method corresponding to the method string

func (*SessionManager) GetSession

func (sm *SessionManager) GetSession(key string) *session.Session

get an already-existing session associated with the key and update the last-seen time

func (*SessionManager) Init

func (sm *SessionManager) Init()

Jump to

Keyboard shortcuts

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