Documentation
¶
Index ¶
- func ConvertListTools(raw json.RawMessage) (*protocol.ListToolsRequest, error)
- func ConvertToolCall(raw json.RawMessage) (*protocol.CallToolRequest, error)
- type Lifecycle
- type Proxy
- type RequestContext
- type Router
- func (r *Router) BackendCount() int
- func (r *Router) Dispatch(ctx *RequestContext)
- func (r *Router) GetStream(id string) *Stream
- func (r *Router) NewStream(id string, w http.ResponseWriter, flusher http.Flusher) *Stream
- func (r *Router) RebuildToolIndex()
- func (r *Router) RemoveStream(id string)
- func (r *Router) Route(toolName string) (string, bool)
- func (r *Router) StreamCount() int
- type RouterTelemetry
- type Server
- type Stream
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertListTools ¶
func ConvertListTools(raw json.RawMessage) (*protocol.ListToolsRequest, error)
func ConvertToolCall ¶
func ConvertToolCall(raw json.RawMessage) (*protocol.CallToolRequest, error)
Types ¶
type Lifecycle ¶
type Lifecycle struct {
// contains filtered or unexported fields
}
func NewLifecycle ¶
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
func (*Proxy) ForwardToSSE ¶
type RequestContext ¶
type RequestContext struct {
ID json.RawMessage
Method string
Params json.RawMessage
RawRequest *protocol.Request
// contains filtered or unexported fields
}
func NewRequestContext ¶
func NewRequestContext(req *protocol.Request, stream *Stream) *RequestContext
func (*RequestContext) Respond ¶
func (ctx *RequestContext) Respond(resp *protocol.Response)
func (*RequestContext) RespondError ¶
func (ctx *RequestContext) RespondError(err protocol.ErrorObject)
func (*RequestContext) RespondResult ¶
func (ctx *RequestContext) RespondResult(result json.RawMessage)
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) BackendCount ¶
func (*Router) Dispatch ¶
func (r *Router) Dispatch(ctx *RequestContext)
func (*Router) RebuildToolIndex ¶
func (r *Router) RebuildToolIndex()
func (*Router) RemoveStream ¶
func (*Router) StreamCount ¶
type RouterTelemetry ¶
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
func (*Stream) HandleMessage ¶
func (s *Stream) HandleMessage(body io.ReadCloser) error
func (*Stream) SendResponse ¶
Click to show internal directories.
Click to hide internal directories.