Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Index ¶
func Index(networkID string, states state_types.StatesByID) ([]error, error)
Index makes index calls via worker goroutines.
- each indexer gets up to maxRetry attempts
- returns after all goroutines have completed
Prefer MustIndex except where receiving the returned errors is relevant.
func MustIndex ¶
func MustIndex(networkID string, states state_types.StatesByID)
MustIndex forwards states to all registered indexers, according to their subscriptions. Per-state indexing errors are logged and reported as metrics. Overarching indexing errors are retried, then eventually logged. Returns after completing attempt at indexing states.
Types ¶
type Error ¶
type Error string
const ( // ErrDefault is the default error reported for index failure. ErrDefault Error = "state index error" // ErrIndexPerState indicates an Index error occurred for specific keys. ErrIndexPerState Error = "state index error: per-state errors" // ErrIndex indicates error source is indexer Index call. ErrIndex Error = "state index error: error from Index" )
Click to show internal directories.
Click to hide internal directories.