Skip to content

Commit

Permalink
Added buffered writter
Browse files Browse the repository at this point in the history
  • Loading branch information
jubeless committed Nov 30, 2022
1 parent b8ccf3b commit b978d39
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/substreams-sink-files/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var SyncRunCmd = Command(syncRunE,
flags.BoolP("insecure", "k", false, "Skip certificate validation on GRPC connection")
flags.BoolP("plaintext", "p", false, "Establish GRPC connection in plaintext")
flags.Uint64P("file-block-count", "c", 10000, "Number of blocks per file")
flags.String("boundary-writer-type", "local_file", "Set which boundary writer to use options are: 'local_file','in_memory','noop'")
flags.String("boundary-writer-type", "local_file", "Set which boundary writer to use options are: 'local_file','in_memory','noop','buf_local_file'")
}),
ExamplePrefixed("substreams-sink-files run",
"mainnet.eth.streaminfast.io:443 substreams.spkg map_transfers '.transfers[]' ./localdata",
Expand Down
2 changes: 2 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ func (c *Config) getBoundaryWriter(zlogger *zap.Logger) (writer.Writer, error) {
switch c.BoundaryWriterType {
case "local_file":
w = writer.NewDStoreIO(c.FileWorkingDir, c.FileOutputStore, fileType, zlogger)
case "buf_local_file":
w = writer.NewBufferedIO(c.FileWorkingDir, c.FileOutputStore, fileType, zlogger)
case "in_memory":
w = writer.NewMem(c.FileOutputStore, fileType, zlogger)
case "noop":
Expand Down

0 comments on commit b978d39

Please sign in to comment.