Fix bd-2: Add daemon RPC support for sync export operations
- Added OpExport/OpImport to RPC protocol - Implemented handleExport() in daemon to export via RPC - Modified sync command to use daemon export when available - Prevents nil pointer dereference when daemon is running - Falls back to direct mode if daemon unavailable
This commit is contained in:
@@ -32,6 +32,8 @@ const (
|
||||
OpReposClearCache = "repos_clear_cache"
|
||||
OpCompact = "compact"
|
||||
OpCompactStats = "compact_stats"
|
||||
OpExport = "export"
|
||||
OpImport = "import"
|
||||
)
|
||||
|
||||
// Request represents an RPC request from client to daemon
|
||||
@@ -284,3 +286,13 @@ type CompactStatsData struct {
|
||||
Tier2MinAge string `json:"tier2_min_age"`
|
||||
EstimatedSavings string `json:"estimated_savings,omitempty"`
|
||||
}
|
||||
|
||||
// ExportArgs represents arguments for the export operation
|
||||
type ExportArgs struct {
|
||||
JSONLPath string `json:"jsonl_path"` // Path to export JSONL file
|
||||
}
|
||||
|
||||
// ImportArgs represents arguments for the import operation
|
||||
type ImportArgs struct {
|
||||
JSONLPath string `json:"jsonl_path"` // Path to import JSONL file
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user