sse

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientTransport

type ClientTransport interface {
	transport.ClientTransport
}

ClientTransport is an SSE transport for MCP clients

func NewClientTransport

func NewClientTransport(sseURL string, opts ...ClientTransportOption) ClientTransport

NewClientTransport creates a new SSE client transport sseURL is the SSE endpoint URL (e.g., "http://localhost:8001/mcp/sse")

type ClientTransportOption

type ClientTransportOption func(*sseClientTransport)

ClientTransportOption configures the client transport

func WithTimeout

func WithTimeout(timeout time.Duration) ClientTransportOption

WithTimeout sets the HTTP client timeout

type ServerTransport

type ServerTransport interface {
	transport.ServerTransport
	// WithMiddleware adds HTTP middleware to be chained before the MCP handler
	WithMiddleware(middleware ...transport.HTTPMiddleware) ServerTransport
}

ServerTransport is an SSE (Server-Sent Events) transport for MCP servers

func NewServerTransport

func NewServerTransport(sseEndpoint string, addr string) ServerTransport

NewServerTransport creates a new SSE server transport sseEndpoint is the path for SSE streaming (e.g., "/mcp/sse") addr is the server address (e.g., ":8001")

Jump to

Keyboard shortcuts

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