Documentation ¶
Index ¶
- type BasicMetrics
- type BeaconState
- type BeaconStateFilter
- func (f *BeaconStateFilter) AddAfter(after time.Time)
- func (f *BeaconStateFilter) AddBeaconImplementation(BeaconImplementation string)
- func (f *BeaconStateFilter) AddBefore(before time.Time)
- func (f *BeaconStateFilter) AddEpoch(epoch uint64)
- func (f *BeaconStateFilter) AddID(id string)
- func (f *BeaconStateFilter) AddLocation(location string)
- func (f *BeaconStateFilter) AddNetwork(network string)
- func (f *BeaconStateFilter) AddNode(node string)
- func (f *BeaconStateFilter) AddNodeVersion(nodeVersion string)
- func (f *BeaconStateFilter) AddSlot(slot uint64)
- func (f *BeaconStateFilter) AddStateRoot(stateRoot string)
- func (f *BeaconStateFilter) ApplyToQuery(query *gorm.DB) (*gorm.DB, error)
- func (f *BeaconStateFilter) Validate() error
- type Config
- type DistinctBeaconStateValueResults
- type DistinctExecutionBadBlockValueResults
- type DistinctExecutionBlockTraceValueResults
- type ExecutionBadBlock
- type ExecutionBadBlockFilter
- func (f *ExecutionBadBlockFilter) AddAfter(after time.Time)
- func (f *ExecutionBadBlockFilter) AddBefore(before time.Time)
- func (f *ExecutionBadBlockFilter) AddBlockExtraData(data string)
- func (f *ExecutionBadBlockFilter) AddBlockHash(hash string)
- func (f *ExecutionBadBlockFilter) AddBlockNumber(number int64)
- func (f *ExecutionBadBlockFilter) AddExecutionImplementation(impl string)
- func (f *ExecutionBadBlockFilter) AddID(id string)
- func (f *ExecutionBadBlockFilter) AddLocation(location string)
- func (f *ExecutionBadBlockFilter) AddNetwork(network string)
- func (f *ExecutionBadBlockFilter) AddNode(node string)
- func (f *ExecutionBadBlockFilter) AddNodeVersion(nodeVersion string)
- func (f *ExecutionBadBlockFilter) ApplyToQuery(query *gorm.DB) (*gorm.DB, error)
- func (f *ExecutionBadBlockFilter) Validate() error
- type ExecutionBlockTrace
- type ExecutionBlockTraceFilter
- func (f *ExecutionBlockTraceFilter) AddAfter(after time.Time)
- func (f *ExecutionBlockTraceFilter) AddBefore(before time.Time)
- func (f *ExecutionBlockTraceFilter) AddBlockHash(hash string)
- func (f *ExecutionBlockTraceFilter) AddBlockNumber(number int64)
- func (f *ExecutionBlockTraceFilter) AddExecutionImplementation(impl string)
- func (f *ExecutionBlockTraceFilter) AddID(id string)
- func (f *ExecutionBlockTraceFilter) AddLocation(location string)
- func (f *ExecutionBlockTraceFilter) AddNetwork(network string)
- func (f *ExecutionBlockTraceFilter) AddNode(node string)
- func (f *ExecutionBlockTraceFilter) AddNodeVersion(nodeVersion string)
- func (f *ExecutionBlockTraceFilter) ApplyToQuery(query *gorm.DB) (*gorm.DB, error)
- func (f *ExecutionBlockTraceFilter) Validate() error
- type Indexer
- func (i *Indexer) CountBeaconState(ctx context.Context, filter *BeaconStateFilter) (int64, error)
- func (i *Indexer) CountExecutionBadBlock(ctx context.Context, filter *ExecutionBadBlockFilter) (int64, error)
- func (i *Indexer) CountExecutionBlockTrace(ctx context.Context, filter *ExecutionBlockTraceFilter) (int64, error)
- func (i *Indexer) DeleteBeaconState(ctx context.Context, id string) error
- func (i *Indexer) DeleteExecutionBadBlock(ctx context.Context, id string) error
- func (i *Indexer) DeleteExecutionBlockTrace(ctx context.Context, id string) error
- func (i *Indexer) DistinctBeaconStateValues(ctx context.Context, fields []string) (*DistinctBeaconStateValueResults, error)
- func (i *Indexer) DistinctExecutionBadBlockValues(ctx context.Context, fields []string) (*DistinctExecutionBadBlockValueResults, error)
- func (i *Indexer) DistinctExecutionBlockTraceValues(ctx context.Context, fields []string) (*DistinctExecutionBlockTraceValueResults, error)
- func (i *Indexer) InsertBeaconState(ctx context.Context, state *BeaconState) error
- func (i *Indexer) InsertExecutionBadBlock(ctx context.Context, trace *ExecutionBadBlock) error
- func (i *Indexer) InsertExecutionBlockTrace(ctx context.Context, trace *ExecutionBlockTrace) error
- func (i *Indexer) ListBeaconState(ctx context.Context, filter *BeaconStateFilter, page *PaginationCursor) ([]*BeaconState, error)
- func (i *Indexer) ListExecutionBadBlock(ctx context.Context, filter *ExecutionBadBlockFilter, page *PaginationCursor) ([]*ExecutionBadBlock, error)
- func (i *Indexer) ListExecutionBlockTrace(ctx context.Context, filter *ExecutionBlockTraceFilter, page *PaginationCursor) ([]*ExecutionBlockTrace, error)
- func (i *Indexer) RemoveBeaconState(ctx context.Context, id string) error
- func (i *Indexer) Start(ctx context.Context) error
- func (i *Indexer) Stop(ctx context.Context) error
- func (i *Indexer) UpdateBeaconState(ctx context.Context, state *BeaconState) error
- type Operation
- type PaginationCursor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicMetrics ¶
type BasicMetrics struct {
// contains filtered or unexported fields
}
func NewBasicMetrics ¶
func NewBasicMetrics(namespace, driverName string, enabled bool) *BasicMetrics
func (*BasicMetrics) ObserveOperation ¶
func (m *BasicMetrics) ObserveOperation(operation Operation)
func (*BasicMetrics) ObserveOperationError ¶
func (m *BasicMetrics) ObserveOperationError(operation Operation)
type BeaconState ¶
type BeaconState struct { gorm.Model ID string `gorm:"primaryKey"` Node string `gorm:"index"` // We have to use int64 here as SQLite doesn't support uint64. This sucks // but slot 9223372036854775808 is probably around the heat death // of the universe so we should be OK. Slot int64 `gorm:"index:idx_slot,where:deleted_at IS NULL"` Epoch int64 StateRoot string FetchedAt time.Time `gorm:"index"` BeaconImplementation string NodeVersion string `gorm:"not null;default:''"` Location string `gorm:"not null;default:''"` Network string `gorm:"not null;default:''"` }
type BeaconStateFilter ¶
type BeaconStateFilter struct { ID *string Node *string Before *time.Time After *time.Time Slot *uint64 Epoch *uint64 StateRoot *string NodeVersion *string Location *string Network *string BeaconImplementation *string }
func (*BeaconStateFilter) AddAfter ¶
func (f *BeaconStateFilter) AddAfter(after time.Time)
func (*BeaconStateFilter) AddBeaconImplementation ¶
func (f *BeaconStateFilter) AddBeaconImplementation(BeaconImplementation string)
func (*BeaconStateFilter) AddBefore ¶
func (f *BeaconStateFilter) AddBefore(before time.Time)
func (*BeaconStateFilter) AddEpoch ¶
func (f *BeaconStateFilter) AddEpoch(epoch uint64)
func (*BeaconStateFilter) AddID ¶
func (f *BeaconStateFilter) AddID(id string)
func (*BeaconStateFilter) AddLocation ¶
func (f *BeaconStateFilter) AddLocation(location string)
func (*BeaconStateFilter) AddNetwork ¶
func (f *BeaconStateFilter) AddNetwork(network string)
func (*BeaconStateFilter) AddNode ¶
func (f *BeaconStateFilter) AddNode(node string)
func (*BeaconStateFilter) AddNodeVersion ¶
func (f *BeaconStateFilter) AddNodeVersion(nodeVersion string)
func (*BeaconStateFilter) AddSlot ¶
func (f *BeaconStateFilter) AddSlot(slot uint64)
func (*BeaconStateFilter) AddStateRoot ¶
func (f *BeaconStateFilter) AddStateRoot(stateRoot string)
func (*BeaconStateFilter) ApplyToQuery ¶
func (*BeaconStateFilter) Validate ¶
func (f *BeaconStateFilter) Validate() error
type ExecutionBadBlock ¶
type ExecutionBadBlock struct { gorm.Model ID string `gorm:"primaryKey"` Node string `gorm:"index"` FetchedAt time.Time `gorm:"index"` ExecutionImplementation string NodeVersion string `gorm:"not null;default:''"` Location string `gorm:"not null;default:''"` Network string `gorm:"not null;default:''"` BlockHash string `gorm:"not null;default:''"` BlockNumber sql.NullInt64 BlockExtraData sql.NullString }
type ExecutionBadBlockFilter ¶
type ExecutionBadBlockFilter struct { ID *string Node *string Before *time.Time After *time.Time NodeVersion *string Location *string Network *string ExecutionImplementation *string BlockHash *string BlockNumber *int64 BlockExtraData *string }
func (*ExecutionBadBlockFilter) AddAfter ¶
func (f *ExecutionBadBlockFilter) AddAfter(after time.Time)
func (*ExecutionBadBlockFilter) AddBefore ¶
func (f *ExecutionBadBlockFilter) AddBefore(before time.Time)
func (*ExecutionBadBlockFilter) AddBlockExtraData ¶
func (f *ExecutionBadBlockFilter) AddBlockExtraData(data string)
func (*ExecutionBadBlockFilter) AddBlockHash ¶
func (f *ExecutionBadBlockFilter) AddBlockHash(hash string)
func (*ExecutionBadBlockFilter) AddBlockNumber ¶
func (f *ExecutionBadBlockFilter) AddBlockNumber(number int64)
func (*ExecutionBadBlockFilter) AddExecutionImplementation ¶
func (f *ExecutionBadBlockFilter) AddExecutionImplementation(impl string)
func (*ExecutionBadBlockFilter) AddID ¶
func (f *ExecutionBadBlockFilter) AddID(id string)
func (*ExecutionBadBlockFilter) AddLocation ¶
func (f *ExecutionBadBlockFilter) AddLocation(location string)
func (*ExecutionBadBlockFilter) AddNetwork ¶
func (f *ExecutionBadBlockFilter) AddNetwork(network string)
func (*ExecutionBadBlockFilter) AddNode ¶
func (f *ExecutionBadBlockFilter) AddNode(node string)
func (*ExecutionBadBlockFilter) AddNodeVersion ¶
func (f *ExecutionBadBlockFilter) AddNodeVersion(nodeVersion string)
func (*ExecutionBadBlockFilter) ApplyToQuery ¶
func (*ExecutionBadBlockFilter) Validate ¶
func (f *ExecutionBadBlockFilter) Validate() error
type ExecutionBlockTrace ¶
type ExecutionBlockTrace struct { gorm.Model ID string `gorm:"primaryKey"` Node string `gorm:"index"` FetchedAt time.Time `gorm:"index"` ExecutionImplementation string NodeVersion string `gorm:"not null;default:''"` Location string `gorm:"not null;default:''"` Network string `gorm:"not null;default:''"` BlockHash string `gorm:"not null;default:''"` BlockNumber int64 }
type ExecutionBlockTraceFilter ¶
type ExecutionBlockTraceFilter struct { ID *string Node *string Before *time.Time After *time.Time NodeVersion *string Location *string Network *string ExecutionImplementation *string BlockHash *string BlockNumber *int64 }
func (*ExecutionBlockTraceFilter) AddAfter ¶
func (f *ExecutionBlockTraceFilter) AddAfter(after time.Time)
func (*ExecutionBlockTraceFilter) AddBefore ¶
func (f *ExecutionBlockTraceFilter) AddBefore(before time.Time)
func (*ExecutionBlockTraceFilter) AddBlockHash ¶
func (f *ExecutionBlockTraceFilter) AddBlockHash(hash string)
func (*ExecutionBlockTraceFilter) AddBlockNumber ¶
func (f *ExecutionBlockTraceFilter) AddBlockNumber(number int64)
func (*ExecutionBlockTraceFilter) AddExecutionImplementation ¶
func (f *ExecutionBlockTraceFilter) AddExecutionImplementation(impl string)
func (*ExecutionBlockTraceFilter) AddID ¶
func (f *ExecutionBlockTraceFilter) AddID(id string)
func (*ExecutionBlockTraceFilter) AddLocation ¶
func (f *ExecutionBlockTraceFilter) AddLocation(location string)
func (*ExecutionBlockTraceFilter) AddNetwork ¶
func (f *ExecutionBlockTraceFilter) AddNetwork(network string)
func (*ExecutionBlockTraceFilter) AddNode ¶
func (f *ExecutionBlockTraceFilter) AddNode(node string)
func (*ExecutionBlockTraceFilter) AddNodeVersion ¶
func (f *ExecutionBlockTraceFilter) AddNodeVersion(nodeVersion string)
func (*ExecutionBlockTraceFilter) ApplyToQuery ¶
func (*ExecutionBlockTraceFilter) Validate ¶
func (f *ExecutionBlockTraceFilter) Validate() error
type Indexer ¶
type Indexer struct {
// contains filtered or unexported fields
}
func NewIndexer ¶
func (*Indexer) CountBeaconState ¶
func (*Indexer) CountExecutionBadBlock ¶
func (*Indexer) CountExecutionBlockTrace ¶
func (*Indexer) DeleteBeaconState ¶
func (*Indexer) DeleteExecutionBadBlock ¶
func (*Indexer) DeleteExecutionBlockTrace ¶
func (*Indexer) DistinctBeaconStateValues ¶
func (*Indexer) DistinctExecutionBadBlockValues ¶
func (*Indexer) DistinctExecutionBlockTraceValues ¶
func (*Indexer) InsertBeaconState ¶
func (i *Indexer) InsertBeaconState(ctx context.Context, state *BeaconState) error
func (*Indexer) InsertExecutionBadBlock ¶
func (i *Indexer) InsertExecutionBadBlock(ctx context.Context, trace *ExecutionBadBlock) error
func (*Indexer) InsertExecutionBlockTrace ¶
func (i *Indexer) InsertExecutionBlockTrace(ctx context.Context, trace *ExecutionBlockTrace) error
func (*Indexer) ListBeaconState ¶
func (i *Indexer) ListBeaconState(ctx context.Context, filter *BeaconStateFilter, page *PaginationCursor) ([]*BeaconState, error)
func (*Indexer) ListExecutionBadBlock ¶
func (i *Indexer) ListExecutionBadBlock(ctx context.Context, filter *ExecutionBadBlockFilter, page *PaginationCursor) ([]*ExecutionBadBlock, error)
func (*Indexer) ListExecutionBlockTrace ¶
func (i *Indexer) ListExecutionBlockTrace(ctx context.Context, filter *ExecutionBlockTraceFilter, page *PaginationCursor) ([]*ExecutionBlockTrace, error)
func (*Indexer) RemoveBeaconState ¶
func (*Indexer) UpdateBeaconState ¶
func (i *Indexer) UpdateBeaconState(ctx context.Context, state *BeaconState) error
type Operation ¶
type Operation string
const ( OperationInsertBeaconState Operation = "insert_beacon_state_metadata" OperationDeleteBeaconState Operation = "delete_beacon_state_metadata" OperationCountBeaconState Operation = "count_beacon_state_metadata" OperationListBeaconState Operation = "list_beacon_state_metadata" OperationUpdateBeaconState Operation = "update_beacon_state_metadata" OperationDistinctValues Operation = "distinct_values" OperationInsertExecutionBlockTrace Operation = "insert_execution_block_trace" OperationDeleteExecutionBlockTrace Operation = "delete_execution_block_trace" OperationCountExecutionBlockTrace Operation = "count_execution_block_trace" OperationListExecutionBlockTrace Operation = "list_execution_block_trace" OperationUpdateExecutionBlockTrace Operation = "update_execution_block_trace" OperationInsertExecutionBadBlock Operation = "insert_execution_bad_block" OperationDeleteExecutionBadBlock Operation = "delete_execution_bad_block" OperationCountExecutionBadBlock Operation = "count_execution_bad_block" OperationListExecutionBadBlock Operation = "list_execution_bad_block" OperationUpdateExecutionBadBlock Operation = "update_execution_bad_block" )
type PaginationCursor ¶
type PaginationCursor struct { // The cursor to start from. Offset int `json:"offset"` // The number of items to return. Limit int `json:"limit"` // OrderBy is the column to order by. OrderBy string `json:"order_by"` }
func (*PaginationCursor) ApplyOffsetLimit ¶
func (p *PaginationCursor) ApplyOffsetLimit(query *gorm.DB) *gorm.DB
func (*PaginationCursor) ApplyOrderBy ¶
func (p *PaginationCursor) ApplyOrderBy(query *gorm.DB) *gorm.DB
func (*PaginationCursor) Validate ¶
func (p *PaginationCursor) Validate() error
Click to show internal directories.
Click to hide internal directories.