Documentation
¶
Overview ¶
SPDX-License-Identifier: AGPL-3.0-or-later
Index ¶
- type BundlerDBReader
- func (r *BundlerDBReader) FetchFederationBlock(ctx context.Context, height int64) (*store.BlockMeta, []store.TxMeta, error)
- func (r *BundlerDBReader) GetLastProcessedHeight(ctx context.Context) (int64, error)
- func (r *BundlerDBReader) GetLatestFederationHeight(ctx context.Context) (int64, error)
- func (r *BundlerDBReader) UpdateLastProcessedHeight(ctx context.Context, height int64) error
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.
Click to show internal directories.
Click to hide internal directories.