Versions in this module Expand all Collapse all v1 v1.0.0 Oct 15, 2018 v0 v0.0.1 Sep 23, 2018 Changes in this version + func SocketType(listenAddr string) string + type EventSubscriber interface + Subscribe func(ctx context.Context, subscriber string, query tmpubsub.Query, ...) error + Unsubscribe func(ctx context.Context, subscriber string, query tmpubsub.Query) error + UnsubscribeAll func(ctx context.Context, subscriber string) error + type RPCError struct + Code int + Data string + Message string + func (err RPCError) Error() string + type RPCRequest struct + ID string + JSONRPC string + Method string + Params json.RawMessage + func ArrayToRequest(cdc *amino.Codec, id string, method string, params []interface{}) (RPCRequest, error) + func MapToRequest(cdc *amino.Codec, id string, method string, params map[string]interface{}) (RPCRequest, error) + func NewRPCRequest(id string, method string, params json.RawMessage) RPCRequest + func (req RPCRequest) String() string + type RPCResponse struct + Error *RPCError + ID string + JSONRPC string + Result json.RawMessage + func NewRPCErrorResponse(id string, code int, msg string, data string) RPCResponse + func NewRPCSuccessResponse(cdc *amino.Codec, id string, res interface{}) RPCResponse + func RPCInternalError(id string, err error) RPCResponse + func RPCInvalidParamsError(id string, err error) RPCResponse + func RPCInvalidRequestError(id string, err error) RPCResponse + func RPCMethodNotFoundError(id string) RPCResponse + func RPCParseError(id string, err error) RPCResponse + func RPCServerError(id string, err error) RPCResponse + func (resp RPCResponse) String() string + type WSRPCConnection interface + Codec func() *amino.Codec + GetEventSubscriber func() EventSubscriber + GetRemoteAddr func() string + TryWriteRPCResponse func(resp RPCResponse) bool + WriteRPCResponse func(resp RPCResponse) + type WSRPCContext struct + Request RPCRequest