Documentation ¶
Index ¶
- func Close() error
- func Init(serverAddr []string) error
- func PublishNewFilterLogEvent(shardID uint32, namespace, id string, crit ethereum.FilterQuery) error
- func PublishShardUpdate(shardID uint32, blkNum uint64, logs []*types.Log) error
- func PublishTxPoolUpdate(shardID uint32, tx types.PoolTransaction, local bool) error
- func SubscribeNewFilterLogEvent(shardID uint32, namespace string, ...)
- func SubscribeShardUpdate(shardID uint32, cb func(blkNum uint64, logs []*types.Log))
- func SubscribeTxPoolUpdate(shardID uint32, cb func(tx types.PoolTransaction, local bool))
- type BlockUpdate
- type LockResult
- type NewFilterUpdated
- type RedisPreempt
- type TxPoolUpdate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PublishNewFilterLogEvent ¶ added in v0.1.26
func PublishNewFilterLogEvent(shardID uint32, namespace, id string, crit ethereum.FilterQuery) error
PublishNewFilterLogEvent publish new filter log event from other readers
func PublishShardUpdate ¶
PublishShardUpdate publish block update event
func PublishTxPoolUpdate ¶
func PublishTxPoolUpdate(shardID uint32, tx types.PoolTransaction, local bool) error
PublishTxPoolUpdate publish tx pool update event
func SubscribeNewFilterLogEvent ¶ added in v0.1.26
func SubscribeNewFilterLogEvent(shardID uint32, namespace string, cb func(id string, crit ethereum.FilterQuery))
SubscribeNewFilterLogEvent subscribe new filter log event from other readers
func SubscribeShardUpdate ¶
SubscribeShardUpdate subscribe block update event
func SubscribeTxPoolUpdate ¶
func SubscribeTxPoolUpdate(shardID uint32, cb func(tx types.PoolTransaction, local bool))
SubscribeTxPoolUpdate subscribe tx pool update event
Types ¶
type BlockUpdate ¶
type BlockUpdate struct { BlkNum uint64 Logs []*types.LogForStorage // types.Log will cut some fields when rpl encoding/decoding look at core/types/log.go:83 }
BlockUpdate block update event
type LockResult ¶ added in v0.1.14
type LockResult int
const ( LockResultSuccess LockResult LockResultRenewalSuccess LockResultFail )
type NewFilterUpdated ¶ added in v0.1.26
type NewFilterUpdated struct { ID string FilterCriteria ethereum.FilterQuery }
NewFilterUpdated new filter update event
type RedisPreempt ¶
type RedisPreempt struct {
// contains filtered or unexported fields
}
func CreatePreempt ¶
func CreatePreempt(key string) *RedisPreempt
CreatePreempt used to create a redis preempt instance
func (*RedisPreempt) LastLockStatus ¶
func (p *RedisPreempt) LastLockStatus() bool
LastLockStatus get the last preempt status
func (*RedisPreempt) TryLock ¶
func (p *RedisPreempt) TryLock(ttlSecond int) (result LockResult, err error)
TryLock attempt to lock the master for ttlSecond
func (*RedisPreempt) Unlock ¶
func (p *RedisPreempt) Unlock() (bool, error)
Unlock try to release the master permission
type TxPoolUpdate ¶
type TxPoolUpdate struct { Local bool Tx types.PoolTransaction // contains filtered or unexported fields }
TxPoolUpdate tx pool update event
Click to show internal directories.
Click to hide internal directories.