# Packages

Package mock is a generated GoMock package.

# Functions

DefaultRWHandler is a utility middleware that attaches request ID and Version to ResponseWriter so when developer has not to bother with response ID and Version when writing response.
No description provided by the author
No description provided by the author
HandleProxyRoundTripError allows to transform a ProxiedRoundTrip Error.
No description provided by the author
No description provided by the author
No description provided by the author
InvalidMethod replies to the request with an invalid method error.
No description provided by the author
InvalidMethodHandler returns a simple handler that replies to each request with an invalid method error.
No description provided by the author
InvalidParamsHandler returns a simple handler that replies to each request with an invalid parameters error.
No description provided by the author
No description provided by the author
MakeHandler takes a function and transform it into a jsonrpc.Handler.
MethodNotFound replies to the request with a method not found error.
No description provided by the author
MethodNotFoundHandler returns a simple handler that replies to each request with an invalid method error.
NewHTTPClient creates a new jsonrpc HTTPClient from an HTTP HTTPClient.
No description provided by the author
NewRouter returns a new router instance.
NewWebsocketClient creates a new jsonrpc HTTPClient from an HTTP HTTPClient.
NotImplementedMethod replies to the request with a not implemented error.
No description provided by the author
NotImplementedMethodHandler returns a simple handler that replies to each request with an invalid method error.
No description provided by the author
No description provided by the author
NotSupportedVersionHandler returns a simple handler that replies to each request with a not supported version request error.
No description provided by the author
ProvideCaller takes a list of user defines callers as argument and automatically populates all caller's fields with RPC functions # It aims at facilitate the implementation of Web3 client connecting to downstream node - Caller MUST be pointers to struct - All caller's fields MUST be functions mathc - Caller field func MUST accept a single input of type jsonrpc.Client and MUST return a single output which is a function - Caller field output func MUST return at most 2 outputs (if 2 the second MUST be an error) Example of valid caller struct: type ExampleCaller struct { CtxInput_NoOutput func(Client) func(context.Context) NoInput_NoOutput func(Client) func() NonCtxInput_NoOutput func(Client) func(int) MultiInput_NoOutput func(Client) func(context.Context, int, string) NoInput_ErrorOutput func(Client) func() error NoInput_IntOutput func(Client) func() int NoInput_IntErrorOutput func(Client) func() (int, error) StructInput_StructOutput func(Client) func(context.Context, *TestParam) (*TestResult, error) AllTags func(Client) func() `method:"exampleMethod" namespace:"eth"` MethodTag func(Client) func() `method:"exampleMethod"` NamespaceTag func(Client) func() `namespace:"eth"` ObjectTag func(Client) func(*TestParam) `object:"-"` }.
No description provided by the author
No description provided by the author
No description provided by the author
WithIncrementalID wraps a HTTPClient with an ID counter an increases it each time a new request comes out.
WithVersion wraps a HTTPClient to set version each time a new request comes out.
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
ErrNotFound is returned when no route match is found.

# Structs

ErrorMsg is a struct allowing to manipulate a JSON-RPC response error.
HTTPClient is a connector to a jsonrpc server.
RequestMsg allows to manipulate a JSON-RPC v2 request.
ResponseMsg allows to manipulate a JSON-RPC v2 response.
Route holds information about a json-rpc route.
RouteMatch stores information about a matched route.
No description provided by the author
WebSocketClient is a connector to a jsonrpc server.

# Interfaces

Client is an jsonrpc HTTPClient interface.
Handler is and JSON-RPC handler to be used in a JSON-RPC server It provides the JSON-RPC abstraction over http.Handler interface.
No description provided by the author

# Type aliases

No description provided by the author