backend

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package backend defines the Session interface for a single persistent backend connection and provides the HTTP-based implementation used in production. It is internal to pkg/vmcp/session.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPConnector

func NewHTTPConnector(registry vmcpauth.OutgoingAuthRegistry) func(
	ctx context.Context,
	target *vmcp.BackendTarget,
	identity *auth.Identity,
) (Session, *vmcp.CapabilityList, error)

NewHTTPConnector returns a function that creates an HTTP-based (streamable-HTTP or SSE) persistent backend Session for each backend.

registry provides the authentication strategy for outgoing backend requests. Pass a registry configured with the "unauthenticated" strategy to disable auth.

Types

type Session

type Session interface {
	sessiontypes.Caller

	// SessionID returns the backend-assigned session ID (if any).
	// Returns "" if the backend did not assign a session ID.
	SessionID() string
}

Session abstracts a persistent, initialised MCP connection to a single backend server. It is created once per backend during session creation and reused for the lifetime of the parent MultiSession.

Each Session is bound to exactly one backend at creation time — callers do not need to pass a routing target to individual method calls.

Implementations must be safe for concurrent use.

Jump to

Keyboard shortcuts

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