Documentation
¶
Index ¶
- type BuildMetadata
- type ComputedIndex
- type Manager
- func (m *Manager) GetCurrent() *types.Index
- func (m *Manager) LoadComputed() (*ComputedIndex, error)
- func (m *Manager) RemoveFile(path string) error
- func (m *Manager) SetIndex(index *types.Index, metadata BuildMetadata)
- func (m *Manager) UpdateSingle(entry types.IndexEntry) error
- func (m *Manager) WriteAtomic(daemonVersion string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildMetadata ¶
type BuildMetadata struct {
BuildDurationMs int `json:"build_duration_ms"`
FilesProcessed int `json:"files_processed"`
CacheHits int `json:"cache_hits"`
APICalls int `json:"api_calls"`
}
BuildMetadata contains information about the index build process
type ComputedIndex ¶
type ComputedIndex struct {
Version string `json:"version"`
GeneratedAt time.Time `json:"generated_at"`
DaemonVersion string `json:"daemon_version"`
Index *types.Index `json:"index"`
Metadata BuildMetadata `json:"metadata"`
}
ComputedIndex represents the precomputed index file structure. This wraps the core types.Index with additional metadata about the index file itself (version, generation time, daemon info).
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles loading, saving, and updating the computed index
func (*Manager) GetCurrent ¶
GetCurrent returns the current index (thread-safe read)
func (*Manager) LoadComputed ¶
func (m *Manager) LoadComputed() (*ComputedIndex, error)
LoadComputed loads the computed index from disk with validation
func (*Manager) RemoveFile ¶
RemoveFile removes a file entry from the index (for Phase 2)
func (*Manager) SetIndex ¶
func (m *Manager) SetIndex(index *types.Index, metadata BuildMetadata)
SetIndex sets the current index (used by daemon when building)
func (*Manager) UpdateSingle ¶
func (m *Manager) UpdateSingle(entry types.IndexEntry) error
UpdateSingle updates a single entry in the index (for Phase 2) This is a placeholder for incremental updates
func (*Manager) WriteAtomic ¶
WriteAtomic writes the computed index to disk atomically Uses temp file + sync + atomic rename to ensure consistency