consumers

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var (
	ErrExportFileExists = errors.New("export file exists")
)
View Source
var Indexer = stream.NewConsumerFactory(func(conns *services.Connections, networkID uint32, chainVM string, chainID string) (indexer services.Consumer, err error) {
	switch chainVM {
	case IndexerAVMName:
		indexer, err = avm.NewWriter(conns, networkID, chainID)
	case IndexerPVMName:
		indexer, err = pvm.NewWriter(conns, networkID, chainID)
	default:
		return nil, stream.ErrUnknownVM
	}
	return indexer, err
})
View Source
var IndexerCChain = stream.NewConsumerCChain
View Source
var IndexerConsensus = stream.NewConsumerConsensusFactory(func(conns *services.Connections, networkID uint32, chainVM string, chainID string) (indexer services.Consumer, err error) {
	switch chainVM {
	case IndexerAVMName:
		indexer, err = avm.NewWriter(conns, networkID, chainID)
	case IndexerPVMName:
		indexer, err = pvm.NewWriter(conns, networkID, chainID)
	default:
		return nil, stream.ErrUnknownVM
	}
	return indexer, err
})

Functions

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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