Documentation
¶
Index ¶
- type BeaconChainDatabase
- type BeaconChainWriter
- type BeaconRpcSource
- func (*BeaconRpcSource) GetBlock(ctx context.Context, tx kv.Tx, slot uint64) (*peers.PeeredObject[*cltypes.SignedBeaconBlock], error)
- func (b *BeaconRpcSource) GetRange(ctx context.Context, _ kv.Tx, from uint64, count uint64) (*peers.PeeredObject[[]*cltypes.SignedBeaconBlock], error)
- func (b *BeaconRpcSource) PurgeRange(ctx context.Context, _ kv.Tx, from uint64, count uint64) error
- func (b *BeaconRpcSource) SaveBlocks(ctx context.Context, blocks *peers.PeeredObject[*cltypes.SignedBeaconBlock]) error
- type BlockSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BeaconChainDatabase ¶
type BeaconChainDatabase interface { BlockSource BeaconChainWriter }
type BeaconChainWriter ¶
type BeaconRpcSource ¶
type BeaconRpcSource struct {
// contains filtered or unexported fields
}
func NewBeaconRpcSource ¶
func NewBeaconRpcSource(rpc *rpc.BeaconRpcP2P) *BeaconRpcSource
func (*BeaconRpcSource) GetBlock ¶
func (*BeaconRpcSource) GetBlock(ctx context.Context, tx kv.Tx, slot uint64) (*peers.PeeredObject[*cltypes.SignedBeaconBlock], error)
func (*BeaconRpcSource) GetRange ¶
func (b *BeaconRpcSource) GetRange(ctx context.Context, _ kv.Tx, from uint64, count uint64) (*peers.PeeredObject[[]*cltypes.SignedBeaconBlock], error)
func (*BeaconRpcSource) PurgeRange ¶
a noop for rpc source since we always return new data
func (*BeaconRpcSource) SaveBlocks ¶
func (b *BeaconRpcSource) SaveBlocks(ctx context.Context, blocks *peers.PeeredObject[*cltypes.SignedBeaconBlock]) error
type BlockSource ¶
type BlockSource interface { GetRange(ctx context.Context, tx kv.Tx, from uint64, count uint64) (*peers.PeeredObject[[]*cltypes.SignedBeaconBlock], error) PurgeRange(ctx context.Context, tx kv.Tx, from uint64, count uint64) error GetBlock(ctx context.Context, tx kv.Tx, slot uint64) (*peers.PeeredObject[*cltypes.SignedBeaconBlock], error) }
Click to show internal directories.
Click to hide internal directories.