Versions in this module Expand all Collapse all v1 v1.0.3 Feb 27, 2025 Changes in this version + const NoIndexInHeap + var ErrFilterNotFound = errors.New("filter not found") + var ErrNoWSConnection = errors.New("no websocket connection") + var ErrWSFilterDoesNotSupportGetChanges = errors.New("web socket Filter doesn't support to return a batch of the changes") + type Config struct + AccessControlAllowOrigin []string + Addr *net.TCPAddr + NetworkID uint64 + NetworkName string + Store JSONRPCStore + Version string + type Dispatcher struct + func (d *Dispatcher) Handle(reqBody []byte) ([]byte, error) + func (d *Dispatcher) HandleWs(reqBody []byte, conn wsConn) ([]byte, error) + func (d *Dispatcher) RemoveFilterByWs(conn wsConn) + type Edge struct + func (e *Edge) GetFilterChanges(id string) (interface{}, error) + func (e *Edge) NetworkId() (interface{}, error) + func (e *Edge) SendRawTelegram(buf argBytes) (interface{}, error) + func (e *Edge) UninstallFilter(id string) (bool, error) + func (e *Edge) Unsubscribe(id string) (bool, error) + type ErrorResponse struct + Error *ObjectError + ID interface{} + JSONRPC string + func (e *ErrorResponse) Bytes() ([]byte, error) + func (e *ErrorResponse) Data() json.RawMessage + func (e *ErrorResponse) GetID() interface{} + type GetResponse struct + Name string + NetworkID uint64 + Version string + type JSONRPC struct + func NewJSONRPC(logger hclog.Logger, config *Config) (*JSONRPC, error) + type JSONRPCStore interface + type NodeFilterManager struct + func NewNodeFilterManager(logger hclog.Logger, store nodeFilterManagerStore) *NodeFilterManager + func (f *NodeFilterManager) Close() + func (f *NodeFilterManager) Exists(id string) bool + func (f *NodeFilterManager) GetFilterChanges(id string) (interface{}, error) + func (f *NodeFilterManager) NewNodeFilter(nodeQuery *NodeQuery, ws wsConn) string + func (f *NodeFilterManager) RemoveFilterByWs(ws wsConn) + func (f *NodeFilterManager) Run() + func (f *NodeFilterManager) Uninstall(id string) bool + type NodeQuery struct + Id string + Name string + Tag string + Version string + func DecodeNodeQueryFromInterface(i interface{}) (*NodeQuery, error) + func (q *NodeQuery) Match(rm *application.Application) bool + type ObjectError struct + Code int + Data interface{} + Message string + func (e *ObjectError) Error() string + type Request struct + ID interface{} + Method string + Params json.RawMessage + type Response interface + Bytes func() ([]byte, error) + Data func() json.RawMessage + GetID func() interface{} + func NewRPCErrorResponse(id interface{}, errCode int, err string, jsonrpcver string) Response + func NewRPCResponse(id interface{}, jsonrpcver string, reply []byte, err jsonrpc.Error) Response + type SuccessResponse struct + Error *ObjectError + ID interface{} + JSONRPC string + Result json.RawMessage + func (s *SuccessResponse) Bytes() ([]byte, error) + func (s *SuccessResponse) Data() json.RawMessage + func (s *SuccessResponse) GetID() interface{}