Documentation
¶
Overview ¶
Package watcher provides file system monitoring for git ref changes.
It watches .git/refs/heads/ and .git/refs/stackit/ for modifications, debounces rapid changes, and notifies subscribers via a callback.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RefWatcher ¶
type RefWatcher struct {
// contains filtered or unexported fields
}
RefWatcher watches git ref directories for changes and triggers callbacks.
func NewRefWatcher ¶
func NewRefWatcher(repoRoot string, debounce time.Duration, onUpdate func()) *RefWatcher
NewRefWatcher creates a watcher that monitors git refs in the given repo. The onUpdate callback is called (debounced) when ref files change.
func (*RefWatcher) Start ¶
func (w *RefWatcher) Start() error
Start begins watching git ref directories. It blocks, so call it in a goroutine.
Click to show internal directories.
Click to hide internal directories.