Versions in this module Expand all Collapse all v0 v0.1.1 Feb 17, 2025 v0.1.0 Nov 7, 2024 Changes in this version + const ContentModifiedCode + const InternalErrorCode + const InvalidParamsCode + const InvalidRequestCode + const MethodNotFoundCode + const ParseErrorCode + const RequestCancelledCode + const ServerNotInitializedCode + const UnknownErrorCodeCode + var ContentModified = BuildInError + var InternalError = BuildInError + var InvalidParams = BuildInError + var InvalidRequest = BuildInError + var MethodNotFound = BuildInError + var ParseError = BuildInError + var RequestCancelled = BuildInError + var ServerNotInitialized = BuildInError + var UnknownErrorCode = BuildInError + type BaseMessage struct + Jsonrpc string + type BuildInError = ResponseError + type CancelParams struct + ID interface{} + type CloserReader interface + func NewFakeCloserReader(r io.Reader) CloserReader + type CloserWriter interface + func NewFakeCloserWriter(w io.Writer) CloserWriter + type Conn struct + func NewConn(reader CloserReader, writer CloserWriter) *Conn + func NewNotCloseConn(reader io.Reader, writer io.Writer) *Conn + func (c *Conn) Close() error + func (c *Conn) Read(p []byte) (n int, err error) + func (c *Conn) Write(p []byte) (n int, err error) + type MethodInfo struct + Handler func(ctx context.Context, req interface{}) (interface{}, error) + Name string + NewRequest func() interface{} + func CancelRequest() MethodInfo + type NotificationMessage struct + Method string + Params json.RawMessage + type ProgressParams struct + Token interface{} + Value interface{} + type ReaderWriter interface + type RequestMessage struct + ID interface{} + Method string + Params json.RawMessage + type ResponseError struct + Code int + Data interface{} + Message string + func (r ResponseError) Error() string + type ResponseMessage struct + Error *ResponseError + ID interface{} + Result interface{} + type Server struct + func NewServer() *Server + func (s *Server) ConnComeIn(conn ReaderWriter) + func (s *Server) RegisterMethod(m MethodInfo) + func (s *Server) SendMsg(resp interface{}) error + type Session struct + func (s *Session) SendMsg(resp interface{}) error + func (s *Session) Start()