Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFS ¶
NewFS creates a sink that writes to a filesystem directory. The fs parameter should be a CreateFS filesystem (e.g., from lfs.New or stream.NewFS). Document paths are passed as-is to fsys.Create() - the client is responsible for proper formatting.
Types ¶
type FS ¶
type FS struct {
// contains filtered or unexported fields
}
FS writes documents to a filesystem directory. It preserves the document path structure. The filesystem is provided by the client (e.g., lfs, stream.NewFS).
type File ¶
type File struct {
// contains filtered or unexported fields
}
File writes documents to a single file. All documents are concatenated into one output file with newline separators. The filesystem is provided by the client (e.g., lfs, stream.NewFS).
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer wraps an io.Writer as a Sink. This is useful for integrating with spool.ForEach or other scenarios where you have an io.Writer and want to use it with Pipeline.
Example with spool:
spool.ForEach(ctx, root, func(ctx, path, r, w) error {
source := source.NewReaderSource(path, r)
sink := sink.NewWriterSink(w)
return pipeline.Run(ctx, source, sink)
})