Documentation ¶
Index ¶
- type BigtableLoader
- func (l *BigtableLoader) BuildPipelineBatch(startBlockNum uint64, numBlocksBeforeStart uint64)
- func (l *BigtableLoader) BuildPipelineJob(startBlockNum uint64, numBlocksBeforeStart uint64, job Job)
- func (l *BigtableLoader) BuildPipelineLive(allowLiveOnEmptyTable bool) error
- func (l *BigtableLoader) BuildPipelinePatch(startBlockNum uint64, numBlocksBeforeStart uint64)
- func (l *BigtableLoader) DoFlush(blockNum uint64) error
- func (l *BigtableLoader) FlushIfNeeded(blockNum uint64, blockTime time.Time) error
- func (l *BigtableLoader) FullJob(blockNum uint64, block *pbcodec.Block, fObj *forkable.ForkableObject) (err error)
- func (l *BigtableLoader) Healthy() bool
- func (l *BigtableLoader) InitLIB(libID string)
- func (l *BigtableLoader) Launch()
- func (l *BigtableLoader) PatchJob(blockNum uint64, blk *pbcodec.Block, fObj *forkable.ForkableObject) (err error)
- func (l *BigtableLoader) ProcessBlock(blk *bstream.Block, obj interface{}) (err error)
- func (l *BigtableLoader) ShouldPushLIBUpdates(dposLIBNum uint64) bool
- func (l *BigtableLoader) ShowProgress(blockNum uint64)
- func (l *BigtableLoader) StopBeforeBlock(blockNum uint64)
- func (l *BigtableLoader) UpdateIrreversibleData(nowIrreversibleBlocks []*bstream.PreprocessedBlock) error
- type Job
- type Loader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BigtableLoader ¶
func NewBigtableLoader ¶
func (*BigtableLoader) BuildPipelineBatch ¶
func (l *BigtableLoader) BuildPipelineBatch(startBlockNum uint64, numBlocksBeforeStart uint64)
func (*BigtableLoader) BuildPipelineJob ¶
func (l *BigtableLoader) BuildPipelineJob(startBlockNum uint64, numBlocksBeforeStart uint64, job Job)
func (*BigtableLoader) BuildPipelineLive ¶
func (l *BigtableLoader) BuildPipelineLive(allowLiveOnEmptyTable bool) error
func (*BigtableLoader) BuildPipelinePatch ¶
func (l *BigtableLoader) BuildPipelinePatch(startBlockNum uint64, numBlocksBeforeStart uint64)
func (*BigtableLoader) DoFlush ¶
func (l *BigtableLoader) DoFlush(blockNum uint64) error
func (*BigtableLoader) FlushIfNeeded ¶
func (l *BigtableLoader) FlushIfNeeded(blockNum uint64, blockTime time.Time) error
func (*BigtableLoader) FullJob ¶
func (l *BigtableLoader) FullJob(blockNum uint64, block *pbcodec.Block, fObj *forkable.ForkableObject) (err error)
fullJob does all the database insertions needed to load the blockchain into our database.
func (*BigtableLoader) Healthy ¶
func (l *BigtableLoader) Healthy() bool
func (*BigtableLoader) InitLIB ¶
func (l *BigtableLoader) InitLIB(libID string)
func (*BigtableLoader) Launch ¶
func (l *BigtableLoader) Launch()
func (*BigtableLoader) PatchJob ¶
func (l *BigtableLoader) PatchJob(blockNum uint64, blk *pbcodec.Block, fObj *forkable.ForkableObject) (err error)
patchDatabase is a "scratch" pad to define patch code that can be applied on an ad-hoc basis. The idea is to leave this function empty when no patch needs to be applied.
When a patch is required, the suggested workflow is to develop the patch code in a side branch. When the code is ready, the "production" commit is tagged with the `patch-<tag>-<date>` where the tag is giving an overview of the patch and the date is the effective date (`<year>-<month>-<day>`): `patch-add-trx-meta-written-2019-06-30`. The branch is then deleted and the tag is pushed to the remote repository.
func (*BigtableLoader) ProcessBlock ¶
func (l *BigtableLoader) ProcessBlock(blk *bstream.Block, obj interface{}) (err error)
func (*BigtableLoader) ShouldPushLIBUpdates ¶
func (l *BigtableLoader) ShouldPushLIBUpdates(dposLIBNum uint64) bool
func (*BigtableLoader) ShowProgress ¶
func (l *BigtableLoader) ShowProgress(blockNum uint64)
func (*BigtableLoader) StopBeforeBlock ¶
func (l *BigtableLoader) StopBeforeBlock(blockNum uint64)
StopBeforeBlock indicates the stop block (exclusive), means that block num will not be inserted.
func (*BigtableLoader) UpdateIrreversibleData ¶
func (l *BigtableLoader) UpdateIrreversibleData(nowIrreversibleBlocks []*bstream.PreprocessedBlock) error
type Loader ¶
type Loader interface { StopBeforeBlock(uint64) BuildPipelineLive(bool) error BuildPipelineBatch(startBlock uint64, beforeStart uint64) BuildPipelinePatch(startBlock uint64, beforeStart uint64) Launch() Healthy() bool // Shutter related Shutdown(err error) OnTerminated(f func(error)) Terminated() <-chan struct{} Err() error }