session

package
v0.0.0-...-249e25c Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2025 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const SessionKeyName = "session_key"
View Source
const SessionMaxAge = 86400 * 30

Variables

This section is empty.

Functions

func ContextSessionKey

func ContextSessionKey(ctx context.Context) []byte

func ContextWithSessionKey

func ContextWithSessionKey(ctx context.Context, sessionKey []byte) context.Context

func KeyHandler

func KeyHandler(fn func(ctx context.Context, c *websocket.Conn)) http.HandlerFunc

Types

type Manager

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

func NewManager

func NewManager(
	logger *zap.Logger,
	store kv.BlobStore,
	queue queue.Transport,
	newVPN VPNFunc,
	broker network.Broker,
	httpmux *httputil.MapServeMux,
) *Manager

func (*Manager) GetOrCreateSession

func (t *Manager) GetOrCreateSession(profileID uint64, profileKey []byte) (*Session, error)

type Session

type Session struct {
	Profile *profilev1.Profile
	Store   dao.Store
	Queue   queue.Queue
	App     app.Control
}

type VPNFunc

type VPNFunc func(key *key.Key) (*vpn.Host, error)

VPNFunc ...

Jump to

Keyboard shortcuts

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