sync

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package sync keeps the non-versioned cache consistent with the versioned .spectackle files (which are the source of truth). A debounced Refresh runs before every tool call: per bundle file, an mtime+size gate decides cheaply that a file changed, and a sha256 of the content decides whether a file the gate calls unchanged really is; on change the file is re-parsed and its doc kinds replaced in the FTS index.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scanner

type Scanner struct {
	Root  workspace.Root
	Cache *cache.Cache
	// contains filtered or unexported fields
}

Scanner drives cache refreshes.

func (*Scanner) MarkDirty

func (s *Scanner) MarkDirty()

MarkDirty voids the debounce window so the next Refresh runs immediately — every server-side write calls this, keeping its effects visible to the very next tool call.

func (*Scanner) Refresh

func (s *Scanner) Refresh() error

Refresh re-syncs changed .spectackle bundle files into the cache. Calls within the debounce window are no-ops.

Jump to

Keyboard shortcuts

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