Renamed from arcdb: module path, cmd/archer, internal/archererr, docs, build scripts and ARCHER_* environment variables. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
22 lines
637 B
Go
22 lines
637 B
Go
// 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() }
|