index

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2020 License: BSD-3-Clause Imports: 8 Imported by: 0

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"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL