consumers

package
v1.2.1-0...-f94cca8 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

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

	MaximumRecordsRead = 10000
	MaxTheads          = 10
	MaxChanSize        = 1000
)

Variables

View Source
var (
	ErrExportFileExists = errors.New("export file exists")
)
View Source
var IndexerCChainDB = stream.NewConsumerCChainDB
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 IndexerConsumerCChain = func(networkID uint32, chainID string) (indexer services.ConsumerCChain, err error) {
	return cvm.NewWriter(networkID, chainID)
}

Functions

func Bootstrap

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

func ExportToDisk

func ExportToDisk(conf *cfg.Config, exportPath string, chainID string) (int64, error)

ExportToDisk writes the stream data for a given chain out to disk

func IndexerFactories

func IndexerFactories(sc *services.Control, config *cfg.Config, factoriesChainDB []stream.ProcessorFactoryChainDB, factoriesInstDB []stream.ProcessorFactoryInstDB) 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 IndexerFactoryContainer

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

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