watcher

package
v0.0.0-...-d96e93c Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: AGPL-3.0-or-later

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BundlerDBReader

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

BundlerDBReader is the new name for our logic component, reflecting its role.

func NewBundlerDBReader

func NewBundlerDBReader(pool *pgxpool.Pool, fedID string) *BundlerDBReader

NewBundlerDBReader creates a new database reader instance.

func (*BundlerDBReader) FetchFederationBlock

func (r *BundlerDBReader) FetchFederationBlock(ctx context.Context, height int64) (*store.BlockMeta, []store.TxMeta, error)

FetchFederationBlock retrieves all data for a single block height from the DB.

func (*BundlerDBReader) GetLastProcessedHeight

func (r *BundlerDBReader) GetLastProcessedHeight(ctx context.Context) (int64, error)

GetLastProcessedHeight queries a state table to find the last height that the bundler successfully processed.

func (*BundlerDBReader) GetLatestFederationHeight

func (r *BundlerDBReader) GetLatestFederationHeight(ctx context.Context) (int64, error)

GetLatestFederationHeight queries the block_meta table to find the latest block that has been written by the feds-worker.

func (*BundlerDBReader) UpdateLastProcessedHeight

func (r *BundlerDBReader) UpdateLastProcessedHeight(ctx context.Context, height int64) error

UpdateLastProcessedHeight updates the state table with the latest height that the bundler has successfully processed.

Jump to

Keyboard shortcuts

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