Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContractData ¶
type ContractData struct {
Contract *model.Contract
Source *model.ContractSource
}
type Controller ¶
func NewController ¶
func NewController(config *config.Config, startBlockHeight, stopBlockHeight uint64, replaceExisting bool) (self *Controller, err error)
Main class that orchestrates main syncer functionalities Setups listening and storing interactions
type Loader ¶
Gets contract's source and init state
func (*Loader) WithInputChannel ¶
func (*Loader) WithMonitor ¶
func (self *Loader) WithMonitor(monitor monitoring.Monitor) *Loader
type Payload ¶
type Payload struct {
BlockHeight uint64
BlockTimestamp uint64
BlockHash arweave.Base64String
Data []*ContractData
}
type Store ¶
type Store struct {
*task.Processor[*Payload, *ContractData]
DB *gorm.DB
// contains filtered or unexported fields
}
Store handles saving data to the database in na robust way. - groups incoming contracts into batches, - ensures data isn't stuck even if a batch isn't big enough
func (*Store) WithInputChannel ¶
func (*Store) WithMonitor ¶
func (self *Store) WithMonitor(v monitoring.Monitor) *Store
func (*Store) WithReplaceExistingData ¶
Click to show internal directories.
Click to hide internal directories.