transport

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StdioTransport

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

StdioTransport implements Transport interface for stdio communication

func NewStdioTransport

func NewStdioTransport() *StdioTransport

NewStdioTransport creates a new stdio transport

func (*StdioTransport) ReadMessage

func (t *StdioTransport) ReadMessage() ([]byte, error)

ReadMessage reads a JSON-RPC message from stdin

func (*StdioTransport) Start

func (t *StdioTransport) Start(ctx context.Context) error

Start the stdio transport

func (*StdioTransport) Stop

func (t *StdioTransport) Stop() error

Stop the stdio transport

func (*StdioTransport) WriteMessage

func (t *StdioTransport) WriteMessage(data []byte) error

WriteMessage writes a JSON-RPC message to stdout

type Transport

type Transport interface {
	Start(ctx context.Context) error
	Stop() error
	ReadMessage() ([]byte, error)
	WriteMessage(data []byte) error
}

Transport interface for MCP communication

Jump to

Keyboard shortcuts

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