fileimporter

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 11 Imported by: 0

README

File Import Plugin

Read files from a directory and import them as blocks. This plugin works with the file exporter plugin to create a simple file-based pipeline.

The genesis must be a plain JSON file named genesis.json regardless of the FilenamePattern.

Configuration

name: file_reader
config:
    # BlocksDir is the path to a directory where block data should be stored.
    # The directory is created if it doesn't exist. If no directory is provided
    # blocks are written to the Conduit data directory.
    #block-dir: "/path/to/directory"
        
    # FilenamePattern is the format used to find block files. It uses go string
    # formatting and should accept one number for the round.
    # The pattern should match the extension of the files to be read.
    filename-pattern: "%[1]d_block.msgp.gz"

Documentation

Index

Constants

View Source
const PluginName = "file_reader"

PluginName to use when configuring.

Variables

This section is empty.

Functions

func New

func New() importers.Importer

New initializes an algod importer

Types

type Config

type Config struct {
	// <code>block-dir</code> is the path to a directory where block data is stored.
	BlocksDir string `yaml:"block-dir"`

	/* <code>filename-pattern</code> is the format used to find block files. It uses go string formatting and should accept one number for the round.
	The default pattern is

	"%[1]d_block.json"
	*/
	FilenamePattern string `yaml:"filename-pattern"`
}

Config specific to the file importer

Jump to

Keyboard shortcuts

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