Documentation
¶
Index ¶
- Constants
- type AddressBackfillArgs
- type AddressBackfillWorker
- func (w *AddressBackfillWorker) Queues() map[string]river.QueueConfig
- func (w *AddressBackfillWorker) Register(workers *river.Workers) error
- func (w *AddressBackfillWorker) SetRiverClient(client *river.Client[pgx.Tx])
- func (w *AddressBackfillWorker) Work(ctx context.Context, job *river.Job[AddressBackfillArgs]) error
- type EScanner
Constants ¶
const IncidentTypeAddressBackfill = "address_backfill"
IncidentTypeAddressBackfill marks processed_incidents rows created by a scanner jump.
const JobKindAddressBackfill = "address_backfill"
const (
QueueAddressBackfill = "address_backfill"
)
QueueAddressBackfill is a dedicated river queue: backfill jobs are enqueued in bulk (one per watched address), and running all of them at once overloads eproxy and takes the shared workers from the confirmation-check jobs.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressBackfillArgs ¶
type AddressBackfillArgs struct {
IncidentID string `json:"incident_id"`
Blockchain wconstants.BlockchainType `json:"blockchain"`
Address string `json:"address"`
FromBlock int64 `json:"from_block"`
ToBlock int64 `json:"to_block"`
}
AddressBackfillArgs replays the transactions of one watched address over a closed block range [FromBlock, ToBlock] that the scanner skipped (jump).
func (AddressBackfillArgs) InsertOpts ¶
func (a AddressBackfillArgs) InsertOpts() river.InsertOpts
InsertOpts routes backfill jobs to their own queue.
func (AddressBackfillArgs) Kind ¶
func (a AddressBackfillArgs) Kind() string
func (AddressBackfillArgs) Validate ¶
func (a AddressBackfillArgs) Validate() error
type AddressBackfillWorker ¶
type AddressBackfillWorker struct {
river.WorkerDefaults[AddressBackfillArgs]
// contains filtered or unexported fields
}
AddressBackfillWorker closes a skipped block range by pulling the watched address transactions from eproxy and pushing them through the shared event pipeline. It never touches the processed_blocks cursor.
func NewAddressBackfillWorker ¶
func NewAddressBackfillWorker( l logger.Logger, conf config.Blockchain, st store.IStore, bs baseservices.IBaseServices, sdk *walletsdk.SDK, ) *AddressBackfillWorker
func (*AddressBackfillWorker) Queues ¶
func (w *AddressBackfillWorker) Queues() map[string]river.QueueConfig
Queues implements taskmanager.WorkerWithRiverClient.
func (*AddressBackfillWorker) Register ¶
func (w *AddressBackfillWorker) Register(workers *river.Workers) error
Register implements taskmanager.WorkerWithRiverClient.
func (*AddressBackfillWorker) SetRiverClient ¶
func (w *AddressBackfillWorker) SetRiverClient(client *river.Client[pgx.Tx])
SetRiverClient implements taskmanager.WorkerWithRiverClient.
func (*AddressBackfillWorker) Work ¶
func (w *AddressBackfillWorker) Work(ctx context.Context, job *river.Job[AddressBackfillArgs]) error
type EScanner ¶
type EScanner struct {
// contains filtered or unexported fields
}
EScanner represents a scanner for explorers throw explorer proxy service.
func New ¶
func New( logger logger.Logger, conf config.Blockchain, st store.IStore, bs baseservices.IBaseServices, tm *taskmanager.TaskManager, sdk *walletsdk.SDK, ) *EScanner
New creates a new instance of EScanner.