Documentation
¶
Index ¶
- func EnsurePointers(ctx context.Context, db *gorm.DB, now time.Time) (int, error)
- func FetchBatch(ctx context.Context, db *gorm.DB, limit int, now time.Time) ([]models.OffchainMetadata, error)
- func Get(db *gorm.DB, sourceType string, url string, hash []byte) (*models.OffchainMetadata, error)
- func SetFetchResult(ctx context.Context, db *gorm.DB, doc *models.OffchainMetadata) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsurePointers ¶
EnsurePointers adds pending off-chain metadata cache rows for every currently known on-chain URL/hash pointer.
func FetchBatch ¶
func FetchBatch( ctx context.Context, db *gorm.DB, limit int, now time.Time, ) ([]models.OffchainMetadata, error)
FetchBatch claims and returns pending or failed cache rows that are due for another fetch attempt.
func Get ¶
func Get( db *gorm.DB, sourceType string, url string, hash []byte, ) (*models.OffchainMetadata, error)
Get retrieves one cached off-chain metadata document by source and on-chain URL/hash pointer. It returns nil when no cache row exists yet.
func SetFetchResult ¶
SetFetchResult persists the worker's latest fetch status for an existing off-chain metadata cache row.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.