watch

package
v0.8.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package watch observes the Claude Code JSONL tree for changes and emits debounced events so the daemon can reload its cache and notify SSE clients.

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
}

func New

func New(root string) (*Watcher, error)

New creates a watcher rooted at path, recursively registering every subdirectory.

func (*Watcher) Close

func (w *Watcher) Close() error

func (*Watcher) Events

func (w *Watcher) Events(ctx context.Context) <-chan struct{}

Events returns a channel that emits once file-system activity settles for 1 second (debounce). Only JSONL writes and new directories trigger. The channel closes when ctx is cancelled or the watcher errors terminally.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL