/
file_exporter_config.go
32 lines (26 loc) · 1.21 KB
/
file_exporter_config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package filewriter
//go:generate go run ../../../../cmd/conduit-docs/main.go ../../../../conduit-docs/
//go:generate go run ../../../../cmd/readme_config_includer/generator.go
//PluginName: conduit_exporters_filewriter
// Config specific to the file exporter
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"`
// TODO: compression level - Default, Fastest, Best compression, etc
// TODO: How to avoid having millions of files in a directory?
// Write batches of blocks to a single file?
// Tree of directories
}