Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultMaxSlots = 100 DefaultMaxChunkSize = 100 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // GetLatestBlockNumber returns the latest block height from the chain GetLatestBlockNumber() (uint64, error) // GetBlock returns specified block GetBlock(uint64) (*core_types.ResultBlock, error) // GetGenesis returns the genesis block GetGenesis() (*core_types.ResultGenesis, error) // GetBlockResults returns the results of executing the transactions // for the specified block GetBlockResults(uint64) (*core_types.ResultBlockResults, error) // CreateBatch creates a new client batch CreateBatch() clientTypes.Batch }
Client defines the interface for the node (client) communication
type Events ¶
type Events interface { // SignalEvent signals a new event to the event manager SignalEvent(events.Event) }
Events is the events API
type Fetcher ¶
type Fetcher struct {
// contains filtered or unexported fields
}
Fetcher is an instance of the block indexer fetcher
type Option ¶
type Option func(f *Fetcher)
func WithLogger ¶
WithLogger sets the logger to be used with the fetcher
func WithMaxChunkSize ¶
WithMaxChunkSize sets the maximum worker chunk size (data range) for the fetcher
func WithMaxSlots ¶
WithMaxSlots sets the maximum worker slots for the fetcher
Click to show internal directories.
Click to hide internal directories.