txhash

package
v0.0.0-...-ce1b770 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTxHashNotFound = errors.New("tx hash not found")

Functions

func NewCacheTxHash

func NewCacheTxHash(cache cache.CacheInterface[string],
	expiration time.Duration,
	logger *zap.Logger) *cacheTxHash

func NewComposite

func NewComposite(
	hashStores []TxHashStore,
	metrics metrics.Metrics,
	logger *zap.Logger) *composite

func NewDedupTxHashStore

func NewDedupTxHashStore(txHashStore TxHashStore, deduplicator *deduplicator.Deduplicator, logger *zap.Logger) *dedupTxHashStore

func NewMongoTxHash

func NewMongoTxHash(database *mongo.Database, logger *zap.Logger) *mongoTxHash

func NewRedisTxHash

func NewRedisTxHash(client *redis.Client,
	prefix string,
	expiration time.Duration,
	logger *zap.Logger) *redisTxHash

Types

type TxHash

type TxHash struct {
	ChainID  sdk.ChainID
	Emitter  string
	Sequence string
	TxHash   string
}

func CreateTxHash

func CreateTxHash(logger *zap.Logger, o *gossipv1.SignedObservation) (*TxHash, error)

type TxHashStore

type TxHashStore interface {
	Get(ctx context.Context, uniqueVaaID string) (*string, error)
	Set(ctx context.Context, uniqueVaaID string, txHash TxHash) error
	SetObservation(ctx context.Context, o *gossipv1.SignedObservation) error
	GetName() string
}

Jump to

Keyboard shortcuts

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