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 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.
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 ¶
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.
Click to show internal directories.
Click to hide internal directories.