filters

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2019 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountBlock

type AccountBlock struct {
	Hash    types.Hash `json:"hash"`
	Removed bool       `json:"removed"`
}

type AccountBlocksMsg

type AccountBlocksMsg struct {
	Blocks []*AccountBlock `json:"result"`
	Id     rpc.ID          `json:"subscription"`
}

type AccountChainEvent

type AccountChainEvent struct {
	Hash   types.Hash
	Height uint64
	Addr   types.Address
	Logs   []*ledger.VmLog
}

type ChainSubscribe

type ChainSubscribe struct {
	// contains filtered or unexported fields
}

func NewChainSubscribe

func NewChainSubscribe(v *vite.Vite, e *EventSystem) *ChainSubscribe

func (*ChainSubscribe) DeletedAccountBlocks

func (c *ChainSubscribe) DeletedAccountBlocks(subLedger map[types.Address][]*ledger.AccountBlock)

func (*ChainSubscribe) InsertedAccountBlocks

func (c *ChainSubscribe) InsertedAccountBlocks(blocks []*vm_context.VmAccountBlock)

func (*ChainSubscribe) PreDeleteAccountBlocks

func (c *ChainSubscribe) PreDeleteAccountBlocks(batch *leveldb.Batch, subLedger map[types.Address][]*ledger.AccountBlock) error

func (*ChainSubscribe) Stop

func (c *ChainSubscribe) Stop()

type EventSystem

type EventSystem struct {
	// contains filtered or unexported fields
}
var Es *EventSystem

func NewEventSystem

func NewEventSystem(v *vite.Vite) *EventSystem

func (*EventSystem) Start

func (es *EventSystem) Start()

func (*EventSystem) Stop

func (es *EventSystem) Stop()

func (*EventSystem) SubscribeAccountBlocks

func (es *EventSystem) SubscribeAccountBlocks(ch chan []*AccountBlock) *RpcSubscription

func (*EventSystem) SubscribeLogs

func (es *EventSystem) SubscribeLogs(p *filterParam, ch chan []*Logs) *RpcSubscription

type FilterType

type FilterType byte
const (
	LogsSubscription FilterType = iota
	AccountBlocksSubscription
)

type Logs

type Logs struct {
	Log              *ledger.VmLog  `json:"log"`
	AccountBlockHash types.Hash     `json:"accountBlockHash"`
	Addr             *types.Address `json:"addr"`
	Removed          bool           `json:"removed"`
}

type LogsMsg

type LogsMsg struct {
	Logs []*Logs `json:"result"`
	Id   rpc.ID  `json:"subscription"`
}

type Range

type Range struct {
	FromHeight string `json:"fromHeight"`
	ToHeight   string `json:"toHeight"`
}

type RpcFilterParam

type RpcFilterParam struct {
	AddrRange map[string]*Range `json:"addrRange"`
	Topics    [][]types.Hash    `json:"topics"`
}

type RpcSubscription

type RpcSubscription struct {
	ID rpc.ID
	// contains filtered or unexported fields
}

func (*RpcSubscription) Err

func (s *RpcSubscription) Err() <-chan error

func (*RpcSubscription) Unsubscribe

func (s *RpcSubscription) Unsubscribe()

type SubscribeApi

type SubscribeApi struct {
	// contains filtered or unexported fields
}

func NewSubscribeApi

func NewSubscribeApi(vite *vite.Vite) *SubscribeApi

func (*SubscribeApi) GetFilterChanges

func (s *SubscribeApi) GetFilterChanges(id rpc.ID) (interface{}, error)

func (*SubscribeApi) GetLogs

func (s *SubscribeApi) GetLogs(param RpcFilterParam) ([]*Logs, error)

func (*SubscribeApi) NewAccountBlocks

func (s *SubscribeApi) NewAccountBlocks(ctx context.Context) (*rpc.Subscription, error)

func (*SubscribeApi) NewAccountBlocksFilter

func (s *SubscribeApi) NewAccountBlocksFilter() (rpc.ID, error)

func (*SubscribeApi) NewLogs

func (s *SubscribeApi) NewLogs(ctx context.Context, param RpcFilterParam) (*rpc.Subscription, error)

func (*SubscribeApi) NewLogsFilter

func (s *SubscribeApi) NewLogsFilter(param RpcFilterParam) (rpc.ID, error)

func (*SubscribeApi) UninstallFilter

func (s *SubscribeApi) UninstallFilter(id rpc.ID) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL