// Package sink contains the file and database write targets. package sink import ( "context" "archer/internal/row" "archer/internal/shard" ) // File writes chunks into shard files. type File struct { W *shard.Writer } func (f *File) WriteChunk(_ context.Context, c *row.Chunk) error { return f.W.WriteChunk(c) } func (f *File) Flush(context.Context) error { return f.W.Flush() } func (f *File) Close() error { return f.W.Close() } // Checkpoint makes buffered shard data durable before a destructive commit. func (f *File) Checkpoint() error { return f.W.Checkpoint() }