Documentation ¶
Index ¶
- Variables
- type Config
- type ForkChoice
- func (f *ForkChoice) AddNewFrame(ctx context.Context, sourceName string, frame *types.Frame) error
- func (f *ForkChoice) BackfillConsensusClient(ctx context.Context) error
- func (f *ForkChoice) BackfillEventSource(ctx context.Context) error
- func (f *ForkChoice) DeleteFrame(ctx context.Context, id string) error
- func (f *ForkChoice) DeleteOldFrames(ctx context.Context) error
- func (f *ForkChoice) DeleteUselessLabels(ctx context.Context) error
- func (f *ForkChoice) GetEthereumNetworkName(_ context.Context) string
- func (f *ForkChoice) GetEthereumNow(_ context.Context) (phase0.Slot, phase0.Epoch, error)
- func (f *ForkChoice) GetEthereumSpecGenesisTime(_ context.Context) time.Time
- func (f *ForkChoice) GetEthereumSpecSecondsPerSlot(_ context.Context) uint64
- func (f *ForkChoice) GetEthereumSpecSlotsPerEpoch(_ context.Context) uint64
- func (f *ForkChoice) GetFrame(ctx context.Context, id string) (*types.Frame, error)
- func (f *ForkChoice) ListEpochs(ctx context.Context, filter *FrameFilter, page PaginationCursor) ([]phase0.Epoch, *PaginationResponse, error)
- func (f *ForkChoice) ListLabels(ctx context.Context, filter *FrameFilter, page PaginationCursor) ([]string, *PaginationResponse, error)
- func (f *ForkChoice) ListMetadata(ctx context.Context, filter *FrameFilter, page PaginationCursor) ([]*types.FrameMetadata, *PaginationResponse, error)
- func (f *ForkChoice) ListNodes(ctx context.Context, filter *FrameFilter, page PaginationCursor) ([]string, *PaginationResponse, error)
- func (f *ForkChoice) ListSlots(ctx context.Context, filter *FrameFilter, page PaginationCursor) ([]phase0.Slot, *PaginationResponse, error)
- func (f *ForkChoice) Start(ctx context.Context) error
- func (f *ForkChoice) Stop(ctx context.Context) error
- type FrameFilter
- type Metrics
- type Operation
- type Options
- type PaginationCursor
- type PaginationResponse
- type SourceMetadata
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ForkChoice ¶
type ForkChoice struct {
// contains filtered or unexported fields
}
func NewForkChoice ¶
func NewForkChoice(namespace string, log logrus.FieldLogger, config *Config, opts *Options) (*ForkChoice, error)
func (*ForkChoice) AddNewFrame ¶
func (*ForkChoice) BackfillConsensusClient ¶ added in v0.0.46
func (f *ForkChoice) BackfillConsensusClient(ctx context.Context) error
func (*ForkChoice) BackfillEventSource ¶ added in v0.0.46
func (f *ForkChoice) BackfillEventSource(ctx context.Context) error
func (*ForkChoice) DeleteFrame ¶
func (f *ForkChoice) DeleteFrame(ctx context.Context, id string) error
func (*ForkChoice) DeleteOldFrames ¶
func (f *ForkChoice) DeleteOldFrames(ctx context.Context) error
func (*ForkChoice) DeleteUselessLabels ¶ added in v0.0.46
func (f *ForkChoice) DeleteUselessLabels(ctx context.Context) error
func (*ForkChoice) GetEthereumNetworkName ¶
func (f *ForkChoice) GetEthereumNetworkName(_ context.Context) string
func (*ForkChoice) GetEthereumNow ¶
func (*ForkChoice) GetEthereumSpecGenesisTime ¶
func (f *ForkChoice) GetEthereumSpecGenesisTime(_ context.Context) time.Time
func (*ForkChoice) GetEthereumSpecSecondsPerSlot ¶
func (f *ForkChoice) GetEthereumSpecSecondsPerSlot(_ context.Context) uint64
func (*ForkChoice) GetEthereumSpecSlotsPerEpoch ¶
func (f *ForkChoice) GetEthereumSpecSlotsPerEpoch(_ context.Context) uint64
func (*ForkChoice) ListEpochs ¶
func (f *ForkChoice) ListEpochs(ctx context.Context, filter *FrameFilter, page PaginationCursor) ([]phase0.Epoch, *PaginationResponse, error)
func (*ForkChoice) ListLabels ¶
func (f *ForkChoice) ListLabels(ctx context.Context, filter *FrameFilter, page PaginationCursor) ([]string, *PaginationResponse, error)
func (*ForkChoice) ListMetadata ¶
func (f *ForkChoice) ListMetadata(ctx context.Context, filter *FrameFilter, page PaginationCursor) ([]*types.FrameMetadata, *PaginationResponse, error)
func (*ForkChoice) ListNodes ¶
func (f *ForkChoice) ListNodes(ctx context.Context, filter *FrameFilter, page PaginationCursor) ([]string, *PaginationResponse, error)
func (*ForkChoice) ListSlots ¶
func (f *ForkChoice) ListSlots(ctx context.Context, filter *FrameFilter, page PaginationCursor) ([]phase0.Slot, *PaginationResponse, error)
type FrameFilter ¶
type FrameFilter struct { Node *string `json:"node"` Before *time.Time `json:"before"` After *time.Time `json:"after"` Slot *uint64 `json:"slot"` Epoch *uint64 `json:"epoch"` Labels *[]string `json:"labels"` ConsensusClient *string `json:"consensus_client"` EventSource *string `json:"event_source"` }
func (*FrameFilter) AsDBFilter ¶
func (f *FrameFilter) AsDBFilter() *db.FrameFilter
func (*FrameFilter) Validate ¶
func (f *FrameFilter) Validate() error
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func (*Metrics) ObserveOperation ¶
func (*Metrics) ObserveOperationError ¶
type Operation ¶
type Operation string
const ( OperationAddFrame Operation = "add_frame" OperationGetFrame Operation = "get_frame" OperationDeleteFrame Operation = "delete_frame" OperationListMetadata Operation = "list_metadata" OperationUpdateMetadata Operation = "update_metadata" OperationListNodes Operation = "list_nodes" OperationListSlots Operation = "list_slots" OperationListEpochs Operation = "list_epochs" OperationListLabels Operation = "list_labels" OperationGetEthereumNow Operation = "get_ethereum_now" OperationGetEthereumSpec Operation = "get_ethereum_spec" OperationGetEthereumNetworkName Operation = "get_ethereum_network_name" )
type Options ¶
type Options struct {
MetricsEnabled bool
}
func DefaultOptions ¶
func DefaultOptions() *Options
func (*Options) SetMetricsEnabled ¶
func (*Options) WithMetricsDisabled ¶
func (*Options) WithMetricsEnabled ¶
type PaginationCursor ¶
type PaginationCursor struct { // The cursor to start from. Offset int `json:"offset"` // The number of items to return. Limit int `json:"limit"` }
func DefaultPagination ¶
func DefaultPagination() *PaginationCursor
func (*PaginationCursor) AsDBPageCursor ¶
func (p *PaginationCursor) AsDBPageCursor() *db.PaginationCursor
type PaginationResponse ¶
type PaginationResponse struct { // The total number of items. Total int64 `json:"total"` }
type SourceMetadata ¶
Click to show internal directories.
Click to hide internal directories.