Categorygithub.com/space307/jsonrpc2
modulepackage
1.1.0
Repository: https://github.com/space307/jsonrpc2.git
Documentation: pkg.go.dev

# README

jsonrpc2

It is simple jsonrpc2 client.

Usage:

	client := NewClient(serverRpcUrl)
	var val int
	err := client.Call(context.Background(), "Divide", struct {
		A,B int
	}{4,2}, &val)

# Functions

NewClient returns jsonrpc2 client.
NewHttpClient returns wiring of standard http.Client.
RequestIDFromContext returns the id value stored in ctx, if any.
WithHttpClient is an option which sets http client implementation for jsonrpc2 client.
WithRequestID returns a new Context that carries id.

# Constants

ErrCodeServer indicates that client could not unmarshal response from server.

# Structs

Request represents a jsonrpc2 request.easyjson:json.
Request represents a jsonrpc2 response.easyjson:json.
ResponseError is a struct which represents a typical jsonrpc2 error according to specification.easyjson:json.

# Interfaces

No description provided by the author
No description provided by the author