Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chunk ¶
type Chunk struct {
Index int `json:"index"`
File string `json:"file"`
RowCount int64 `json:"row_count"`
SHA256 string `json:"sha256"`
}
Chunk represents a single data file in the backup.
type Compressor ¶
type Compressor struct {
// contains filtered or unexported fields
}
Compressor provides a zstd compressed writer.
func NewCompressor ¶
func NewCompressor(w io.Writer) (*Compressor, error)
NewCompressor creates a new Compressor wrapping the provided writer.
func (*Compressor) Close ¶
func (c *Compressor) Close() error
Close finalizes the compression and closes the encoder.
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine handles the backup workflow.
type Manifest ¶
type Manifest struct {
Version int `json:"version"`
OperationID string `json:"operation_id"`
Source SourceMetadata `json:"source"`
CreatedAt time.Time `json:"created_at"`
RowCount int64 `json:"row_count"`
ChunkSizeBytes int64 `json:"chunk_size_bytes"`
Chunks []Chunk `json:"chunks"`
SchemaSnapshot schema.Schema `json:"schema_snapshot"`
}
Manifest represents the index of a completed backup.
type NDJSONSerializer ¶
type NDJSONSerializer struct{}
NDJSONSerializer implements the Serializer interface for Newline Delimited JSON.
func NewNDJSONSerializer ¶
func NewNDJSONSerializer() *NDJSONSerializer
NewNDJSONSerializer creates a new NDJSONSerializer.
type ParquetSerializer ¶
type ParquetSerializer struct {
// contains filtered or unexported fields
}
ParquetSerializer implements the Serializer interface for Parquet format.
func NewParquetSerializer ¶
func NewParquetSerializer(s *schema.Schema) (*ParquetSerializer, error)
NewParquetSerializer creates a new ParquetSerializer for the given schema.
type RestoreEngine ¶
type RestoreEngine struct {
// contains filtered or unexported fields
}
RestoreEngine handles the restoration workflow.
func NewRestoreEngine ¶
func NewRestoreEngine(s storage.Storage, target adapter.TargetAdapter) *RestoreEngine
NewRestoreEngine creates a new restore engine.
type Serializer ¶
type Serializer interface {
// Serialize writes a single record to the writer.
Serialize(w io.Writer, rec *record.Record) error
// Flush ensures any buffered data is written to the writer.
Flush(w io.Writer) error
// Close finalizes the serialization process.
Close(w io.Writer) error
}
Serializer defines the interface for converting records into a streamable format.
type SourceMetadata ¶
type SourceMetadata struct {
Type string `json:"type"`
DB string `json:"db"`
Table string `json:"table"`
}
SourceMetadata contains information about the database source.