ingest

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package ingest wires the Source adapters (issue #8), the chunker (issue #7), the optional embedder (issue #7), and the Store (issue #10) together into the `lore add`/`lore refresh` flows (issue #3).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pipeline

type Pipeline struct {
	Sources  source.Registry
	Store    store.Store
	Embedder embed.Embedder // nil disables vector search, per issue #7
	Logger   *slog.Logger
}

func (*Pipeline) Add

func (p *Pipeline) Add(ctx context.Context, ref string) (identity.ID, string, error)

Add implements `lore add <ref>[@version]`, issue #3. ref must be a typed-prefix identity (e.g. "github:owner/repo") or bare adapter-specific reference prefixed the same way; bare-name source inference (issue #3's "or a bare name lore attempts to infer a source for") isn't implemented yet — callers must give the type prefix explicitly for now.

func (*Pipeline) Refresh

func (p *Pipeline) Refresh(ctx context.Context, libraryID, version string) error

Refresh implements `lore refresh [<library_id>[@version]]`, issue #3, using the manual-trigger + content_hash-diff strategy decided in issue #12: re-fetch, and only re-chunk/re-embed pages whose hash changed. (The conditional-request optimization from #12 — ETags/commit SHAs — and the "registry versions are immutable, only discover new ones" nuance are not implemented yet; this always does the content_hash-diff fallback path, which is correct, just not the cheapest case in #12's design.)

Jump to

Keyboard shortcuts

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