Documentation ¶
Overview ¶
Package logger handles logging various scribe events and errors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReportIndexerError ¶
func ReportIndexerError(err error, indexerData scribeTypes.IndexerConfig, errorType ErrorType)
ReportIndexerError reports an error that occurs in an indexer.
nolint
func ReportScribeError ¶
ReportScribeError reports an error that occurs anywhere in scribe.
nolint:exhaustive
func ReportScribeState ¶
func ReportScribeState(chainID uint32, block uint64, addresses []common.Address, statusType StatusType)
ReportScribeState reports a state that occurs anywhere in scribe.
Types ¶
type ErrorType ¶
type ErrorType int
ErrorType is a type of error.
const ( // ContextCancelled is returned when the context is canceled. ContextCancelled ErrorType = iota // LivefillIndexerError is returned when the livefill indexer encounters an error. LivefillIndexerError // BackfillIndexerError is returned when an indexer backfilling a contract to the head encounters an error. BackfillIndexerError // GetLogsError is returned when the logs cannot be retrieved. GetLogsError // GetTxError is returned when the tx cannot be retrieved. GetTxError // CouldNotGetReceiptError is returned when the receipt cannot be retrieved. CouldNotGetReceiptError // GetBlockError is returned when the block cannot be retrieved. GetBlockError // BlockByNumberError is returned when the block cannot be retrieved. BlockByNumberError // StoreError is returned when data cannot be inserted into the database. StoreError // ReadError is returned when data cannot be read from the database. ReadError // TestError is returned when an error during a test occurs. TestError // EmptyGetLogsChunk is returned when a getLogs chunk is empty. EmptyGetLogsChunk // FatalScribeError is for when something goes wrong with scribe. FatalScribeError // ErroneousHeadBlock is returned when the head block is below the last indexed. ErroneousHeadBlock )
type StatusType ¶
type StatusType int
StatusType is a type of status for a process in scribe.
const ( // InitiatingLivefill is returned when a contract backfills and is moving to livefill. InitiatingLivefill StatusType = iota // ConcurrencyThresholdReached is returned when the concurrency threshold is reached. ConcurrencyThresholdReached // FlushingLivefillAtHead is returned when a livefill indexer is flushing at the head. FlushingLivefillAtHead // CreatingSQLStore is returned when a SQL store is being created. CreatingSQLStore // BackfillCompleted is returned when a backfill is completed. BackfillCompleted // BeginBackfillIndexing is returned when a backfill is beginning. BeginBackfillIndexing )
Click to show internal directories.
Click to hide internal directories.