Documentation ¶
Index ¶
- Variables
- type JSONRPC2Handler
- func (jh *JSONRPC2Handler) Handle(conn *jsonrpc2.Conn, req *jsonrpc2.Request)
- func (jh *JSONRPC2Handler) MustRegisterMethod(method string, h jsonrpc2.Handler)
- func (jh *JSONRPC2Handler) RegisterMethod(method string, h jsonrpc2.Handler) error
- func (jh *JSONRPC2Handler) ServeHTTP(rw http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrMethodAlreadyRegistered = errors.New("duplicate method name")
)
Functions ¶
This section is empty.
Types ¶
type JSONRPC2Handler ¶
type JSONRPC2Handler struct {
// contains filtered or unexported fields
}
func NewJSONRPC2Handler ¶
func NewJSONRPC2Handler() *JSONRPC2Handler
func (*JSONRPC2Handler) Handle ¶
func (jh *JSONRPC2Handler) Handle(conn *jsonrpc2.Conn, req *jsonrpc2.Request)
Handle implements jsonrpc2.Handler interface.
func (*JSONRPC2Handler) MustRegisterMethod ¶
func (jh *JSONRPC2Handler) MustRegisterMethod(method string, h jsonrpc2.Handler)
func (*JSONRPC2Handler) RegisterMethod ¶
func (jh *JSONRPC2Handler) RegisterMethod(method string, h jsonrpc2.Handler) error
func (*JSONRPC2Handler) ServeHTTP ¶
func (jh *JSONRPC2Handler) ServeHTTP(rw http.ResponseWriter, r *http.Request)
ServeHTTP implements http.Handler interface.
Click to show internal directories.
Click to hide internal directories.