Documentation ¶
Overview ¶
Package shardingbirdsnest transaction filter mplementation
Index ¶
- func New(config *sbn.ShardingBirdsNestConfig, log protocol.Logger, ...) (protocol.TxFilter, error)
- type TxFilter
- func (f *TxFilter) Add(txId string) error
- func (f *TxFilter) Adds(txIds []string) error
- func (f *TxFilter) AddsAndSetHeight(txIds []string, height uint64) error
- func (f *TxFilter) Close()
- func (f *TxFilter) GetHeight() uint64
- func (f *TxFilter) IsExists(txId string, ruleType ...bn.RuleType) (exists bool, stat *txfilter.Stat, err error)
- func (f *TxFilter) IsExistsAndReturnHeight(txId string, ruleType ...bn.RuleType) (exists bool, height uint64, stat *txfilter.Stat, err error)
- func (f *TxFilter) SetHeight(height uint64)
- func (f *TxFilter) ValidateRule(txId string, ruleType ...bn.RuleType) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TxFilter ¶
type TxFilter struct {
// contains filtered or unexported fields
}
TxFilter Sharding transaction filter
func (*TxFilter) AddsAndSetHeight ¶
AddsAndSetHeight batch add tx id and set height
func (*TxFilter) IsExists ¶
func (f *TxFilter) IsExists(txId string, ruleType ...bn.RuleType) (exists bool, stat *txfilter.Stat, err error)
IsExists Check whether TxId exists in the transaction filter
func (*TxFilter) IsExistsAndReturnHeight ¶
func (f *TxFilter) IsExistsAndReturnHeight(txId string, ruleType ...bn.RuleType) (exists bool, height uint64, stat *txfilter.Stat, err error)
IsExistsAndReturnHeight is exists and return height
Click to show internal directories.
Click to hide internal directories.