Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeduplicateFrontmatter ¶
DeduplicateFrontmatter removes duplicate keys from YAML frontmatter, keeping the last value for each key.
Types ¶
type ScanResult ¶
type ScanResult struct {
Changed []lib.Task // tasks whose content changed (new or modified)
Deleted []lib.TaskIdentifier // task identifiers that were previously known but are now gone
}
ScanResult holds the outcome of a single vault scan cycle.
type VaultScanner ¶
type VaultScanner interface {
// Run starts the polling loop. Blocks until ctx is cancelled.
// Results are sent to the provided channel; the caller owns the channel.
Run(ctx context.Context, results chan<- ScanResult) error
// RunCycle executes a single scan cycle (git pull + file scan + optional commit/push).
// Exported for use in scanner_test package; prefer Run() in production.
RunCycle(ctx context.Context, results chan<- ScanResult)
}
func NewGitRestVaultScanner ¶
func NewGitRestVaultScanner( gitClient gitclient.GitClient, taskDir string, pollInterval time.Duration, trigger <-chan struct{}, m metrics.Metrics, autoInject bool, ) VaultScanner
NewGitRestVaultScanner creates a VaultScanner that reads and writes vault files via the gitclient.GitClient interface methods (ListFiles, ReadFile, WriteFile). Use this constructor when git-rest HTTP mode is enabled.
Click to show internal directories.
Click to hide internal directories.