Documentation
¶
Index ¶
- Variables
- func GetStartBlock(ctx context.Context, blockMetaStoreURL string, logger *zap.Logger, ...) (uint64, error)
- type Indexer
- type Store
- func (s *Store) GetBlockMetaByHash(ctx context.Context, blockHash string) (*pbbstream.BlockMeta, error)
- func (s *Store) GetBlockMetaByNumber(ctx context.Context, blockNum uint64) (*pbbstream.BlockMeta, error)
- func (s *Store) GetLastWrittenBlockNum(ctx context.Context) (uint64, error)
- func (s *Store) WriteBlockMeta(ctx context.Context, blockMeta *pbbstream.BlockMeta) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBlockNotFound = errors.New("block not found")
Functions ¶
Types ¶
type Indexer ¶
func NewIndexer ¶
func (*Indexer) Check ¶
func (app *Indexer) Check(ctx context.Context, in *pbhealth.HealthCheckRequest) (*pbhealth.HealthCheckResponse, error)
Check is basic GRPC Healthcheck
func (*Indexer) Watch ¶
func (app *Indexer) Watch(req *pbhealth.HealthCheckRequest, stream pbhealth.Health_WatchServer) error
Watch is basic GRPC Healthcheck as a stream
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) GetBlockMetaByHash ¶
func (s *Store) GetBlockMetaByHash(ctx context.Context, blockHash string) (*pbbstream.BlockMeta, error)
GetBlockMetaByHash returns the block meta for the given block hash. If the block hash cannot be found in the store, it returns ErrBlockNotFound.
func (*Store) GetBlockMetaByNumber ¶
func (s *Store) GetBlockMetaByNumber(ctx context.Context, blockNum uint64) (*pbbstream.BlockMeta, error)
GetBlockMetaByNumber returns the block meta for the given block number. If the block number cannot be found in the store, it returns ErrBlockNotFound.
func (*Store) GetLastWrittenBlockNum ¶
Click to show internal directories.
Click to hide internal directories.