session

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SyncTesterSessionFromContext

func SyncTesterSessionFromContext(ctx context.Context) (*eth.SyncTesterSession, bool)

SyncTesterSessionFromContext retrieves the Session from the context, if present.

func WithSession

func WithSession[T any](
	mgr *SessionManager,
	ctx context.Context,
	logger log.Logger,
	fn func(*eth.SyncTesterSession, log.Logger) (T, error),
) (T, error)

func WithSyncTesterSession

func WithSyncTesterSession(ctx context.Context, s *eth.SyncTesterSession) context.Context

WithSyncTesterSession returns a new context with the given Session.

Types

type SessionManager

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

func NewSessionManager

func NewSessionManager(logger log.Logger) *SessionManager

func (*SessionManager) DeleteSession

func (s *SessionManager) DeleteSession(sessionID string) error

func (*SessionManager) SessionIDs

func (s *SessionManager) SessionIDs() []string

Jump to

Keyboard shortcuts

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