searchcache

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package searchcache is Harbor's SQLite FTS5-backed tool search cache (Phase 107c / D-167). It mirrors the shape of internal/skills/drivers/localdb — FTS5 search over indexed tool name + description + tags, with a regex fallback for environments without FTS5.

The driver self-registers under "searchcache" from its init(). The production binary picks it up via blank import in cmd/harbor/main.go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DSN string
}

Config carries the SearchCache driver configuration.

type SearchCache

type SearchCache interface {
	Search(ctx context.Context, query string, tags []string, limit int) ([]tools.Tool, error)
	Sync(ctx context.Context, tools []tools.Tool) error
	Close() error
}

SearchCache is the tool search index. Production callers reach this through the tools.Catalog and never construct a driver directly.

func New

func New(cfg Config) (SearchCache, error)

New constructs a SQLite-backed SearchCache against cfg.DSN.

Jump to

Keyboard shortcuts

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