Documentation ¶
Index ¶
- Constants
- type DB
- func (db *DB) GetExecutionRecord(q *ExecutionRecordQuery) (*models.ExecutionRecord, error)
- func (db *DB) GetExecutionRecordByID(id []byte) *models.ExecutionRecord
- func (db *DB) GetExecutionRecords(q *ExecutionRecordsQuery) ([]*models.ExecutionRecord, error)
- func (db *DB) GetExecutionRecordsToExecute() []*models.ExecutionRecord
- func (dal *DB) GetMonitorBlock(key string) (blknum uint64, blkidx int64, found bool, err error)
- func (db *DB) IncrAttemptAndRevert(id []byte, revertStatus types.ExecutionStatus) error
- func (db *DB) IncreaseRetryCount(id []byte) (newCount uint64)
- func (db *DB) RevertStatus(id []byte, status types.ExecutionStatus) error
- func (db *DB) SaveExecutionContext(execCtx *msgtypes.ExecutionContext) error
- func (db *DB) SaveExecutionContexts(execCtxs []*msgtypes.ExecutionContext)
- func (dal *DB) SetMonitorBlock(key string, blockNum uint64, blockIdx int64) error
- func (db *DB) UpdateExecCtx(id []byte, execCtx *msgtypes.ExecutionContext) error
- func (db *DB) UpdateRetryCount(id []byte, retryCount uint64)
- func (db *DB) UpdateStatus(id []byte, status types.ExecutionStatus) error
- func (db *DB) UpdateTx(id []byte, tx common.Hash) error
- type ExecutionRecordQuery
- type ExecutionRecordsQuery
- type WhereBuilder
Constants ¶
View Source
const ( AND = "AND" OR = "OR" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
func (*DB) GetExecutionRecord ¶
func (db *DB) GetExecutionRecord(q *ExecutionRecordQuery) (*models.ExecutionRecord, error)
func (*DB) GetExecutionRecordByID ¶
func (db *DB) GetExecutionRecordByID(id []byte) *models.ExecutionRecord
func (*DB) GetExecutionRecords ¶
func (db *DB) GetExecutionRecords(q *ExecutionRecordsQuery) ([]*models.ExecutionRecord, error)
func (*DB) GetExecutionRecordsToExecute ¶
func (db *DB) GetExecutionRecordsToExecute() []*models.ExecutionRecord
func (*DB) GetMonitorBlock ¶
func (*DB) IncrAttemptAndRevert ¶
func (db *DB) IncrAttemptAndRevert(id []byte, revertStatus types.ExecutionStatus) error
func (*DB) IncreaseRetryCount ¶
func (*DB) RevertStatus ¶
func (db *DB) RevertStatus(id []byte, status types.ExecutionStatus) error
func (*DB) SaveExecutionContext ¶
func (db *DB) SaveExecutionContext(execCtx *msgtypes.ExecutionContext) error
func (*DB) SaveExecutionContexts ¶
func (db *DB) SaveExecutionContexts(execCtxs []*msgtypes.ExecutionContext)
func (*DB) SetMonitorBlock ¶
func (*DB) UpdateExecCtx ¶
func (db *DB) UpdateExecCtx(id []byte, execCtx *msgtypes.ExecutionContext) error
func (*DB) UpdateRetryCount ¶
func (*DB) UpdateStatus ¶
func (db *DB) UpdateStatus(id []byte, status types.ExecutionStatus) error
UpdateStatus updates the execution status of a message. `id` is computed differently for each type of message: message associated with peg mint: id = mintId = hash(account, token, amount, depositor, refChainId, refId) message associated with peg withdraw: id = mintId, same as peg mint message associated with liquidity send: id = dstTransferId = hash(sender, receiver, token, amount, srcChainId, dstChainId, srcTransferId) message associated with liquidity withdraw: id = wdId = hash(chainid, seqnum, receiver, token, amount) all above ids are again hashed with bridge address id = hash(bridgeAddr, id) no transfer associated: id = messageId
type ExecutionRecordQuery ¶
type ExecutionRecordsQuery ¶
type WhereBuilder ¶
type WhereBuilder struct {
// contains filtered or unexported fields
}
func (*WhereBuilder) And ¶
func (w *WhereBuilder) And(expr string, args ...interface{}) *WhereBuilder
func (*WhereBuilder) Build ¶
func (w *WhereBuilder) Build() string
func (*WhereBuilder) Or ¶
func (w *WhereBuilder) Or(expr string, args ...interface{}) *WhereBuilder
func (*WhereBuilder) String ¶
func (w *WhereBuilder) String() string
Click to show internal directories.
Click to hide internal directories.