fix(build): move EstimateBackupSize to platform-independent file
Some checks failed
CI/CD / Test (push) Failing after 4s
CI/CD / Generate SBOM (push) Has been skipped
CI/CD / Lint (push) Failing after 4s
CI/CD / Build (darwin-amd64) (push) Has been skipped
CI/CD / Build (linux-amd64) (push) Has been skipped
CI/CD / Build (darwin-arm64) (push) Has been skipped
CI/CD / Build (linux-arm64) (push) Has been skipped
CI/CD / Release (push) Has been skipped
CI/CD / Build & Push Docker Image (push) Has been skipped
CI/CD / Mirror to GitHub (push) Has been skipped

Fixes Windows, OpenBSD, and NetBSD builds by extracting
EstimateBackupSize from disk_check.go (which has build tags
excluding those platforms) to a new estimate.go file.
This commit is contained in:
2025-12-13 21:55:39 +01:00
parent 573f2776d7
commit f033b02cec
10 changed files with 126 additions and 125 deletions

View File

@@ -106,11 +106,11 @@ type Filter struct {
// StreamerState holds the current state of the streamer
type StreamerState struct {
Position Position `json:"position"`
EventCount uint64 `json:"event_count"`
ByteCount uint64 `json:"byte_count"`
LastUpdate time.Time `json:"last_update"`
StartTime time.Time `json:"start_time"`
Position Position `json:"position"`
EventCount uint64 `json:"event_count"`
ByteCount uint64 `json:"byte_count"`
LastUpdate time.Time `json:"last_update"`
StartTime time.Time `json:"start_time"`
TargetStatus []TargetStatus `json:"targets"`
}
@@ -125,17 +125,17 @@ type TargetStatus struct {
// Event represents a parsed binlog event
type Event struct {
Type string `json:"type"` // "write", "update", "delete", "query", "gtid", etc.
Timestamp time.Time `json:"timestamp"`
Database string `json:"database,omitempty"`
Table string `json:"table,omitempty"`
Position Position `json:"position"`
GTID string `json:"gtid,omitempty"`
Query string `json:"query,omitempty"` // For query events
Rows []map[string]any `json:"rows,omitempty"` // For row events
OldRows []map[string]any `json:"old_rows,omitempty"` // For update events
RawData []byte `json:"-"` // Raw binlog data for replay
Extra map[string]any `json:"extra,omitempty"`
Type string `json:"type"` // "write", "update", "delete", "query", "gtid", etc.
Timestamp time.Time `json:"timestamp"`
Database string `json:"database,omitempty"`
Table string `json:"table,omitempty"`
Position Position `json:"position"`
GTID string `json:"gtid,omitempty"`
Query string `json:"query,omitempty"` // For query events
Rows []map[string]any `json:"rows,omitempty"` // For row events
OldRows []map[string]any `json:"old_rows,omitempty"` // For update events
RawData []byte `json:"-"` // Raw binlog data for replay
Extra map[string]any `json:"extra,omitempty"`
}
// Target interface for binlog output destinations