consumers

package
v0.0.0-...-4c0c530 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IndexerAVMName = "avm"
	IndexerPVMName = "pvm"

	MaximumRecordsRead = 10000
	MaxTheads          = 10

	IteratorTimeout = 3 * time.Minute
)

Variables

View Source
var IndexerAXChainDB = stream.NewConsumerAXChainDB
View Source
var IndexerConsumer = func(networkID uint32, chainVM string, chainID string) (indexer services.Consumer, err error) {
	switch chainVM {
	case IndexerAVMName:
		indexer, err = avm.NewWriter(networkID, chainID)
	case IndexerPVMName:
		indexer, err = pvm.NewWriter(networkID, chainID)
	default:
		return nil, stream.ErrUnknownVM
	}
	return indexer, err
}
View Source
var IndexerConsumerAXChain = func(networkID uint32, chainID string) (indexer services.ConsumerAXChain, err error) {
	return cvm.NewWriter(networkID, chainID)
}

Functions

func Bootstrap

func Bootstrap(sc *servicesctrl.Control, networkID uint32, chains cfg.Chains, factories []ConsumerFactory) error

func IndexerFactories

func IndexerFactories(
	sc *servicesctrl.Control,
	config *cfg.Config,
	factoriesChainDB []stream.ProcessorFactoryChainDB,
	factoriesInstDB []stream.ProcessorFactoryInstDB,
	wg *sync.WaitGroup,
	runningControl utils.Running,
) error

Types

type ConsumerDBFactory

type ConsumerDBFactory func(uint32, string, string) (stream.ProcessorFactoryChainDB, error)

type ConsumerFactory

type ConsumerFactory func(uint32, string, string) (services.Consumer, error)

type IndexerFactoryControl

type IndexerFactoryControl struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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