session

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2025 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 Manager

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

Manager manages multiple sessions

func NewManager

func NewManager(store knowledge.Store) *Manager

NewManager creates a new session manager

func (*Manager) GetOrCreateSession

func (m *Manager) GetOrCreateSession(sessionID string) *Session

GetOrCreateSession gets an existing session or creates a new one

func (*Manager) GetSession

func (m *Manager) GetSession(sessionID string) *Session

GetSession retrieves a session by ID

func (*Manager) ListSessions

func (m *Manager) ListSessions() []*Session

ListSessions returns all active sessions

func (*Manager) RemoveSession

func (m *Manager) RemoveSession(sessionID string)

RemoveSession removes a session

type Session

type Session struct {
	ID        string                 `json:"id"`
	StartedAt time.Time              `json:"started_at"`
	Metadata  map[string]interface{} `json:"metadata"`
	// contains filtered or unexported fields
}

Session represents a user session with the MCP server

func (*Session) GetMetadata

func (s *Session) GetMetadata(key string) (interface{}, bool)

GetMetadata gets metadata from a session

func (*Session) SetMetadata

func (s *Session) SetMetadata(key string, value interface{})

SetMetadata sets metadata for a session

Jump to

Keyboard shortcuts

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