Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type JsonRpcResponse ¶
type JsonRpcRouter ¶
type JsonRpcRouter interface { /// SetRequestHandler sets a handler for a request that would return a response SetRequestHandler(request Request, handler func(req Request) (Result, *Error)) /// SetNotificationHandler sets a handler for a notification, that would not return any response SetNotificationHandler(request Request, handler func(req Request)) /// Handle processes incoming JSON-RPC request and either returns JSON-RPC result or error within response /// or returns nil if successfully processed notification Handle(b []byte) *JsonRpcResponse }
func NewJsonRPCRouter ¶
func NewJsonRPCRouter() JsonRpcRouter
type RequestId ¶
func NewIntRequestId ¶
func NewMissingRequestId ¶
func NewMissingRequestId() RequestId
func NewNullRequestId ¶
func NewNullRequestId() RequestId
func NewStringRequestId ¶
func (RequestId) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.