Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aggregate ¶
type Aggregate struct { StartedAtHeight int64 `json:"started_at_height"` StartedAt types.Time `json:"started_at"` RecentAtHeight int64 `json:"recent_at_height"` RecentAt types.Time `json:"recent_at"` }
Aggregate is used for aggregate tables
type BlockSeq ¶
type BlockSummary ¶
type BlockSummary struct { *Model *Summary Count int64 `json:"count"` BlockTimeAvg float64 `json:"block_time_avg"` }
func (BlockSummary) TableName ¶
func (BlockSummary) TableName() string
type Model ¶
type Model struct { ID types.ID `json:"id"` CreatedAt types.Time `json:"created_at"` UpdatedAt types.Time `json:"updated_at"` }
Model is used for general table
type Report ¶
type Report struct { *Model Kind ReportKind IndexVersion int64 StartHeight int64 EndHeight int64 SuccessCount *int64 ErrorCount *int64 ErrorMsg *string Duration time.Duration CompletedAt *types.Time }
type ReportKind ¶
type ReportKind int
const ( ReportKindIndex ReportKind = iota + 1 ReportKindParallelReindex ReportKindSequentialReindex )
func (ReportKind) String ¶
func (k ReportKind) String() string
type Summary ¶
type Summary struct { IndexVersion int64 `json:"index_version"` TimeInterval types.SummaryInterval `json:"time_interval"` TimeBucket types.Time `json:"time_bucket"` }
Summary is used for summary tables
type Syncable ¶
type Syncable struct { *Model Height int64 `json:"height"` Time types.Time `json:"time"` SpecVersion string `json:"spec_version"` ChainUID string `json:"chain_uid"` Session int64 `json:"session"` Era int64 `json:"era"` LastInSession bool `json:"last_in_session"` LastInEra bool `json:"last_in_era"` IndexVersion int64 `json:"index_version"` Status SyncableStatus `json:"status"` ReportID types.ID `json:"report_id"` StartedAt types.Time `json:"started_at"` ProcessedAt *types.Time `json:"processed_at"` Duration time.Duration `json:"duration"` }
func (*Syncable) MarkProcessed ¶
func (*Syncable) SetStatus ¶
func (s *Syncable) SetStatus(newStatus SyncableStatus)
type SyncableStatus ¶
type SyncableStatus int
const ( SyncableStatusRunning SyncableStatus = iota + 1 SyncableStatusCompleted )
Click to show internal directories.
Click to hide internal directories.