Documentation ¶
Index ¶
- type AccountBlock
- type AccountBlocksMsg
- type AccountChainEvent
- type ChainSubscribe
- func (c *ChainSubscribe) DeleteAccountBlocks(blocks []*ledger.AccountBlock) error
- func (c *ChainSubscribe) DeleteSnapshotBlocks(chunks []*ledger.SnapshotChunk) error
- func (c *ChainSubscribe) InsertAccountBlocks(blocks []*vm_db.VmAccountBlock) error
- func (c *ChainSubscribe) InsertSnapshotBlocks(chunks []*ledger.SnapshotChunk) error
- func (c *ChainSubscribe) PrepareDeleteAccountBlocks(blocks []*ledger.AccountBlock) error
- func (c *ChainSubscribe) PrepareDeleteSnapshotBlocks(chunks []*ledger.SnapshotChunk) error
- func (c *ChainSubscribe) PrepareInsertAccountBlocks(blocks []*vm_db.VmAccountBlock) error
- func (c *ChainSubscribe) PrepareInsertSnapshotBlocks(chunks []*ledger.SnapshotChunk) error
- func (c *ChainSubscribe) Stop()
- type EventSystem
- func (es *EventSystem) Start()
- func (es *EventSystem) Stop()
- func (es *EventSystem) SubscribeAccountBlocks(ch chan []*AccountBlock) *RpcSubscription
- func (es *EventSystem) SubscribeLogs(p *filterParam, ch chan []*Logs) *RpcSubscription
- func (es *EventSystem) SubscribeSnapshotBlocks(ch chan []*SnapshotBlock) *RpcSubscription
- type FilterType
- type Logs
- type LogsMsg
- type Range
- type RpcFilterParam
- type RpcSubscription
- type SnapshotBlock
- type SnapshotBlocksMsg
- type SnapshotChainEvent
- type SubscribeApi
- func (s *SubscribeApi) GetFilterChanges(id rpc.ID) (interface{}, error)
- func (s *SubscribeApi) GetLogs(param RpcFilterParam) ([]*Logs, error)
- func (s *SubscribeApi) NewAccountBlocks(ctx context.Context) (*rpc.Subscription, error)
- func (s *SubscribeApi) NewAccountBlocksFilter() (rpc.ID, error)
- func (s *SubscribeApi) NewLogs(ctx context.Context, param RpcFilterParam) (*rpc.Subscription, error)
- func (s *SubscribeApi) NewLogsFilter(param RpcFilterParam) (rpc.ID, error)
- func (s *SubscribeApi) NewSnapshotBlocks(ctx context.Context) (*rpc.Subscription, error)
- func (s *SubscribeApi) NewSnapshotBlocksFilter() (rpc.ID, error)
- func (s *SubscribeApi) UninstallFilter(id rpc.ID) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountBlock ¶
type AccountBlocksMsg ¶
type AccountBlocksMsg struct { Blocks []*AccountBlock `json:"result"` Id rpc.ID `json:"subscription"` }
type AccountChainEvent ¶
type ChainSubscribe ¶
type ChainSubscribe struct {
// contains filtered or unexported fields
}
func NewChainSubscribe ¶
func NewChainSubscribe(v *vite.Vite, e *EventSystem) *ChainSubscribe
func (*ChainSubscribe) DeleteAccountBlocks ¶
func (c *ChainSubscribe) DeleteAccountBlocks(blocks []*ledger.AccountBlock) error
func (*ChainSubscribe) DeleteSnapshotBlocks ¶
func (c *ChainSubscribe) DeleteSnapshotBlocks(chunks []*ledger.SnapshotChunk) error
func (*ChainSubscribe) InsertAccountBlocks ¶
func (c *ChainSubscribe) InsertAccountBlocks(blocks []*vm_db.VmAccountBlock) error
func (*ChainSubscribe) InsertSnapshotBlocks ¶
func (c *ChainSubscribe) InsertSnapshotBlocks(chunks []*ledger.SnapshotChunk) error
func (*ChainSubscribe) PrepareDeleteAccountBlocks ¶
func (c *ChainSubscribe) PrepareDeleteAccountBlocks(blocks []*ledger.AccountBlock) error
func (*ChainSubscribe) PrepareDeleteSnapshotBlocks ¶
func (c *ChainSubscribe) PrepareDeleteSnapshotBlocks(chunks []*ledger.SnapshotChunk) error
func (*ChainSubscribe) PrepareInsertAccountBlocks ¶
func (c *ChainSubscribe) PrepareInsertAccountBlocks(blocks []*vm_db.VmAccountBlock) error
func (*ChainSubscribe) PrepareInsertSnapshotBlocks ¶
func (c *ChainSubscribe) PrepareInsertSnapshotBlocks(chunks []*ledger.SnapshotChunk) 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
func (*EventSystem) SubscribeSnapshotBlocks ¶
func (es *EventSystem) SubscribeSnapshotBlocks(ch chan []*SnapshotBlock) *RpcSubscription
type FilterType ¶
type FilterType byte
const ( LogsSubscription FilterType = iota AccountBlocksSubscription SnapshotBlocksSubscription )
type RpcFilterParam ¶
type RpcSubscription ¶
func (*RpcSubscription) Err ¶
func (s *RpcSubscription) Err() <-chan error
func (*RpcSubscription) Unsubscribe ¶
func (s *RpcSubscription) Unsubscribe()
type SnapshotBlock ¶
type SnapshotBlocksMsg ¶
type SnapshotBlocksMsg struct { Blocks []*SnapshotBlock `json:"result"` Id rpc.ID `json:"subscription"` }
type SnapshotChainEvent ¶
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) NewSnapshotBlocks ¶
func (s *SubscribeApi) NewSnapshotBlocks(ctx context.Context) (*rpc.Subscription, error)
func (*SubscribeApi) NewSnapshotBlocksFilter ¶
func (s *SubscribeApi) NewSnapshotBlocksFilter() (rpc.ID, error)
func (*SubscribeApi) UninstallFilter ¶
func (s *SubscribeApi) UninstallFilter(id rpc.ID) bool
Click to show internal directories.
Click to hide internal directories.