Documentation
¶
Overview ¶
Package http provides an HTTP implementation of the MCP transport.
This package implements the Transport interface using HTTP, suitable for applications requiring JSON-RPC communication.
Index ¶
Constants ¶
View Source
const DefaultShutdownTimeout = 10 * time.Second
DefaultShutdownTimeout is the default timeout for graceful shutdown
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncMessageHandler ¶
type AsyncMessageHandler func(message []byte)
AsyncMessageHandler is a function that handles asynchronous JSON-RPC notifications
type Transport ¶
type Transport struct {
transport.BaseTransport
// contains filtered or unexported fields
}
Transport implements the transport.Transport interface for HTTP
func NewTransport ¶
NewTransport creates a new HTTP transport
func (*Transport) Initialize ¶
Initialize initializes the transport
func (*Transport) Receive ¶
Receive is not directly applicable for HTTP transport (HTTP is request/response based)
func (*Transport) RegisterAsyncHandler ¶
func (t *Transport) RegisterAsyncHandler(method string, handler AsyncMessageHandler)
RegisterAsyncHandler registers a handler for asynchronous message processing
Click to show internal directories.
Click to hide internal directories.