Documentation
¶
Overview ¶
Package ignore provides functionality for processing .thvignore files to filter bind mount contents using tmpfs overlays.
Index ¶
- type Config
- type OverlayMount
- type Processor
- func (p *Processor) Cleanup() error
- func (p *Processor) GetOverlayMounts(bindMount, containerPath string) []OverlayMount
- func (p *Processor) GetOverlayPaths(bindMount, containerPath string) []string
- func (p *Processor) LoadGlobal() error
- func (p *Processor) LoadLocal(sourceDir string) error
- func (p *Processor) ShouldIgnore(path string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
LoadGlobal bool // Whether to load global ignore patterns
PrintOverlays bool // Whether to print resolved overlay paths for debugging
}
Config holds configuration for ignore processing
type OverlayMount ¶
type OverlayMount struct {
ContainerPath string // Path in the container to overlay
HostPath string // Host path (for bind mounts) or empty (for tmpfs)
Type string // "tmpfs" for directories, "bind" for files
}
OverlayMount represents a mount that should overlay an ignored path
type Processor ¶
type Processor struct {
GlobalPatterns []string
LocalPatterns []string
Config *Config
// contains filtered or unexported fields
}
Processor handles loading and processing ignore patterns
func NewProcessor ¶
NewProcessor creates a new Processor instance with the given configuration
func (*Processor) Cleanup ¶
Cleanup removes all overlay artifacts (shared empty file and directories)
func (*Processor) GetOverlayMounts ¶
func (p *Processor) GetOverlayMounts(bindMount, containerPath string) []OverlayMount
GetOverlayMounts returns mounts that should overlay ignored paths based on the loaded ignore patterns
func (*Processor) GetOverlayPaths ¶
GetOverlayPaths returns container paths that should be overlaid based on the loaded ignore patterns (kept for backward compatibility)
func (*Processor) LoadGlobal ¶
LoadGlobal loads global ignore patterns from ~/.config/toolhive/thvignore
func (*Processor) LoadLocal ¶
LoadLocal loads local ignore patterns from the configured ignore file in the specified directory
func (*Processor) ShouldIgnore ¶
ShouldIgnore checks if a given path should be ignored based on loaded patterns