indexer

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Indexer

type Indexer struct {
	// contains filtered or unexported fields
}

func New

func New(database *db.DB, root string) *Indexer

func (*Indexer) IndexFile

func (idx *Indexer) IndexFile(path string) error

IndexFile re-indexes a single file (called by the watcher). It writes the file's symbols and pending edges, then runs a targeted resolution: pending edges originating from this file, and pending edges from other files whose target name matches a symbol newly defined in this file.

func (*Indexer) IndexRepo

func (idx *Indexer) IndexRepo() error

IndexRepo performs a full two-pass index of the repository.

Pass 1 (parallel): walk the tree, parse each file, write symbols and the raw (unresolved) edges into pending_edges. Edge targets are stored as names because cross-file references generally cannot be resolved until every file's symbols exist.

Pass 2 (sequential): clear the resolved edges table and re-derive it from pending_edges with the now-complete symbol table. dep_count in module_stats is recomputed from the resolved edges, not from raw extraction counts.

func (*Indexer) RemoveFile

func (idx *Indexer) RemoveFile(path string) error

func (*Indexer) Watch

func (idx *Indexer) Watch() error

Jump to

Keyboard shortcuts

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