Documentation
¶
Index ¶
- Constants
- type JSONRPCError
- type JSONRPCRequest
- type JSONRPCResponse
- type Prompt
- type Resource
- type Server
- func (s *Server) HandlePayload(payload []byte, errOut io.Writer) ([]byte, bool, error)
- func (s *Server) Prompts() []Prompt
- func (s *Server) Resources() []Resource
- func (s *Server) ServeHTTP(ctx context.Context, port int, errOut io.Writer) error
- func (s *Server) ServeStdio(ctx context.Context, in io.Reader, out io.Writer, errOut io.Writer) error
- func (s *Server) Tools() []Tool
- type Tool
Constants ¶
View Source
const ProtocolVersion = "2024-11-05"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONRPCError ¶
type JSONRPCRequest ¶
type JSONRPCRequest struct {
JSONRPC string `json:"jsonrpc"`
ID json.RawMessage `json:"id,omitempty"`
Method string `json:"method"`
Params json.RawMessage `json:"params,omitempty"`
}
type JSONRPCResponse ¶
type JSONRPCResponse struct {
JSONRPC string `json:"jsonrpc"`
ID any `json:"id,omitempty"`
Result any `json:"result,omitempty"`
Error *JSONRPCError `json:"error,omitempty"`
}
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) HandlePayload ¶
func (*Server) ServeStdio ¶
Click to show internal directories.
Click to hide internal directories.