Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher recursively watches the vault root and fans out change events to any subscribed channels. Mirrors the chokidar-based watcher in src/main/watcher.ts.
func Disabled ¶
Disabled returns a watcher that does no filesystem watching. It still supports Subscribe/Close so the rest of the server can treat it like a real watcher; it simply never emits change events. Used where inotify is unavailable or explicitly turned off — notably unprivileged LXC containers, where inotify operations can wedge the process (unkillable, bind-mount locked) instead of returning an error. (#179)
func StartOrDisabled ¶
StartOrDisabled starts a real watcher, or falls back to a no-op watcher when watching is turned off (disable) or unavailable. It never returns an error, so the server can always serve the vault even where inotify is restricted. (#179)
func (*Watcher) Active ¶
Active reports whether this watcher really watches the filesystem. The Disabled fallback (inotify unavailable or explicitly off, #179) has no fsnotify handle and never emits an event; capabilities must not promise live updates it cannot deliver, or clients skip polling AND never hear about changes.
func (*Watcher) SetFolderPaths ¶
func (*Watcher) Subscribe ¶
func (w *Watcher) Subscribe() (<-chan vault.ChangeEvent, func())