session

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ChannelSize = 10
View Source
const NotificationQueueName = "_notification"

Variables

This section is empty.

Functions

This section is empty.

Types

type MCMCPSession

type MCMCPSession struct {
	LastUpdated time.Time
	// contains filtered or unexported fields
}

MCMCPSession (Multi-Cluster MCP Session)

func NewLocalMCMCPSession

func NewLocalMCMCPSession(ctx context.Context) (*MCMCPSession, error)

func NewRedisMCMCPSession

func NewRedisMCMCPSession(ctx context.Context, sessionID string, redis redis.Cmdable) (*MCMCPSession, error)

func (*MCMCPSession) Cancel

func (M *MCMCPSession) Cancel()

func (*MCMCPSession) Context

func (M *MCMCPSession) Context() context.Context

func (*MCMCPSession) Initialize

func (M *MCMCPSession) Initialize()

func (*MCMCPSession) Initialized

func (M *MCMCPSession) Initialized() bool

func (*MCMCPSession) IsLocal

func (M *MCMCPSession) IsLocal() bool

func (*MCMCPSession) NotificationChannel

func (M *MCMCPSession) NotificationChannel() chan<- mcp.JSONRPCNotification

func (*MCMCPSession) Queue

func (M *MCMCPSession) Queue() queues.Queue[string]

func (*MCMCPSession) QueueEvent

func (M *MCMCPSession) QueueEvent() chan string

func (*MCMCPSession) QueueNotificationEvent

func (M *MCMCPSession) QueueNotificationEvent() queues.Queue[mcp.JSONRPCNotification]

func (*MCMCPSession) SessionID

func (M *MCMCPSession) SessionID() string

type Session

type Session interface {
	SessionID() string
	NotificationChannel() chan<- mcp.JSONRPCNotification
	Initialize()
	Initialized() bool
	QueueEvent() chan string
	IsLocal() bool
	Cancel()
	Context() context.Context
	QueueNotificationEvent() queues.Queue[mcp.JSONRPCNotification]
}

Jump to

Keyboard shortcuts

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