shardingbirdsnest

package
v0.0.0-...-bda353b Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package shardingbirdsnest transaction filter mplementation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New transaction filter init

Types

type TxFilter

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

TxFilter Sharding transaction filter

func (*TxFilter) Add

func (f *TxFilter) Add(txId string) error

Add txId to transaction filter

func (*TxFilter) Adds

func (f *TxFilter) Adds(txIds []string) error

Adds batch Add txId

func (*TxFilter) AddsAndSetHeight

func (f *TxFilter) AddsAndSetHeight(txIds []string, height uint64) error

AddsAndSetHeight batch add tx id and set height

func (*TxFilter) Close

func (f *TxFilter) Close()

Close transaction filter

func (*TxFilter) GetHeight

func (f *TxFilter) GetHeight() uint64

GetHeight get height from transaction filter

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

func (*TxFilter) SetHeight

func (f *TxFilter) SetHeight(height uint64)

SetHeight set height from transaction filter

func (*TxFilter) ValidateRule

func (f *TxFilter) ValidateRule(txId string, ruleType ...bn.RuleType) error

ValidateRule validate rules

Jump to

Keyboard shortcuts

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