pipeline

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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IRepository

type IRepository interface {
	GetVaaIdTxHash(ctx context.Context, id string) (*VaaIdTxHash, error)
	UpdateVaaDocTxHash(ctx context.Context, id string, txhash string) error
}

Interface

type ItemTuple

type ItemTuple struct {
	Retries int
	Event   topic.Event
}

type Publisher

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

Publisher definition.

func NewPublisher

func NewPublisher(pushFunc topic.PushFunc, metrics metrics.Metrics, repository *Repository, p2pNetwork string, txHashHandler *TxHashHandler, logger *zap.Logger) *Publisher

NewPublisher creates a new publisher for vaa with parse configuration.

func (*Publisher) Publish

func (p *Publisher) Publish(ctx context.Context, e *watcher.Event)

Publish sends a Event for the vaa that has parse configuration defined.

type Repository

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

Repository is the repository data access layer.

func NewRepository

func NewRepository(db *mongo.Database, log *zap.Logger) *Repository

NewRepository creates a new repository.

func (*Repository) GetVaaIdTxHash

func (r *Repository) GetVaaIdTxHash(ctx context.Context, id string) (*VaaIdTxHash, error)

GetVaaIdTxHash returns a vaaIdTxHash document.

func (*Repository) UpdateVaaDocTxHash

func (r *Repository) UpdateVaaDocTxHash(ctx context.Context, id string, txhash string) error

UpdateVaaTxHash update a txhash in a vaa document.

type TxHashHandler

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

func NewTxHashHandler

func NewTxHashHandler(repository IRepository, pushFunc topic.PushFunc, alertClient alert.AlertClient, metrics metrics.Metrics, logger *zap.Logger, quit chan bool) *TxHashHandler

NewTxHashHandler creates a new TxHashHandler.

func (*TxHashHandler) AddVaaFixItem

func (t *TxHashHandler) AddVaaFixItem(event topic.Event)

Add a new element to the fixItems array

func (*TxHashHandler) Run

func (t *TxHashHandler) Run(ctx context.Context)

type VaaIdTxHash

type VaaIdTxHash struct {
	VaaID     string      `bson:"vaaId"`
	ChainID   vaa.ChainID `bson:"emitterChain"`
	Emitter   string      `bson:"emitterAddr"`
	Sequence  string      `bson:"sequence"`
	TxHash    string      `bson:"txHash"`
	UpdatedAt *time.Time  `bson:"updatedAt"`
}

VaaIdTxHash represents a vaaIdTxHash document.

type VaaUpdate

type VaaUpdate struct {
	TxHash    string     `bson:"txHash,omitempty"`
	UpdatedAt *time.Time `bson:"updatedAt"`
}

VaaUpdate represents a vaa document.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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