Documentation ¶
Index ¶
Constants ¶
View Source
const ( // PluginName to use when configuring. PluginName = "file_writer" // FilePattern is used to name the output files. FilePattern = "%[1]d_block.json" )
Variables ¶
This section is empty.
Functions ¶
func DecodeJSONFromFile ¶
DecodeJSONFromFile is used to decode a file to an object.
func EncodeJSONToFile ¶
EncodeJSONToFile is used to encode an object to a file. If the file ends in .gz it will be gzipped.
Types ¶
type Config ¶
type Config struct { /* <code>blocks-dir</code> is an optional path to a directory where block data should be stored.<br/> The directory is created if it doesn't exist.<br/> If no directory is provided the default plugin data directory is used. */ BlocksDir string `yaml:"block-dir"` /* <code>filename-pattern</code> is the format used to write block files. It uses go string formatting and should accept one number for the round.<br/> If the file has a '.gz' extension, blocks will be gzipped. Default: "%[1]d_block.json" */ FilenamePattern string `yaml:"filename-pattern"` // <code>drop-certificate</code> is used to remove the vote certificate from the block data before writing files. DropCertificate bool `yaml:"drop-certificate"` }
Config specific to the file exporter
Click to show internal directories.
Click to hide internal directories.