Versions in this module Expand all Collapse all v3 v3.2.0-rc2 Jul 19, 2024 v3.2.0-rc1 Mar 10, 2024 v3.1.1 Feb 20, 2024 Changes in this version + const MaxHeaderSize v3.1.1-rc1 Dec 2, 2023 v3.1.0 Jul 17, 2023 v3.1.0-rc1 Jul 17, 2023 v3.0.5 Feb 2, 2023 v3.0.5-rc1 Feb 2, 2023 v3.0.4 Dec 2, 2022 Changes in this version type JsonrpcExporter + func (je *JsonrpcExporter) UnExport() v3.0.4-rc1 Dec 2, 2022 v3.0.3-rc2 Oct 6, 2022 v3.0.3-rc1 Sep 30, 2022 v3.0.2 Jun 5, 2022 v3.0.1 Feb 17, 2022 v3.0.0 Dec 7, 2021 Changes in this version + const CodeInternalError + const CodeInvalidParams + const CodeInvalidRequest + const CodeMethodNotFound + const CodeParseError + const DefaultHTTPRspBufferSize + const DefaultMaxSleepTime + const JSONRPC + const MAX_JSONRPC_ID + const PathPrefix + const VERSION + var Version = "2.0" + func GetProtocol() protocol.Protocol + type CodecData struct + Args interface{} + Error string + ID int64 + Method string + type Error struct + Code int + Data interface{} + Message string + func NewError(code int, message string) *Error + func (e *Error) Error() string + type HTTPClient struct + ID int64 + func NewHTTPClient(opt *HTTPOptions) *HTTPClient + func (c *HTTPClient) Call(ctx context.Context, service *common.URL, req *Request, rsp interface{}) error + func (c *HTTPClient) Do(addr, path string, httpHeader http.Header, body []byte) ([]byte, error) + func (c *HTTPClient) NewRequest(service *common.URL, method string, args interface{}) *Request + type HTTPOptions struct + HTTPTimeout time.Duration + HandshakeTimeout time.Duration + type JsonrpcExporter struct + func NewJsonrpcExporter(key string, invoker protocol.Invoker, exporterMap *sync.Map) *JsonrpcExporter + func (je *JsonrpcExporter) Unexport() + type JsonrpcInvoker struct + func NewJsonrpcInvoker(url *common.URL, client *HTTPClient) *JsonrpcInvoker + func (ji *JsonrpcInvoker) Invoke(ctx context.Context, invocation protocol.Invocation) protocol.Result + type JsonrpcProtocol struct + func NewJsonrpcProtocol() *JsonrpcProtocol + func (jp *JsonrpcProtocol) Destroy() + func (jp *JsonrpcProtocol) Export(invoker protocol.Invoker) protocol.Exporter + func (jp *JsonrpcProtocol) Refer(url *common.URL) protocol.Invoker + type Request struct + ID int64 + type Server struct + func NewServer() *Server + func (s *Server) Start(url *common.URL) + func (s *Server) Stop() + type ServerCodec struct + func (c *ServerCodec) ReadBody(x interface{}) error + func (c *ServerCodec) ReadHeader(header map[string]string, body []byte) error + func (c *ServerCodec) Write(errMsg string, x interface{}) ([]byte, error) v3.0.0-rc4-1 Nov 12, 2021 v3.0.0-rc4 Nov 10, 2021 v3.0.0-rc3 Oct 30, 2021 v3.0.0-rc2 Jun 20, 2021 v3.0.0-rc1 May 15, 2021