Documentation
¶
Overview ¶
Package source defines where documents come from. A Source lists and reads files; the indexer decides what changed. Watch support is a separate optional interface so poll-only sources (git) stay simple.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileMeta ¶
FileMeta is a cheap listing entry, used for incremental sync before any content is read.
type Source ¶
type Source interface {
Name() string
// Sync brings the local view up to date (git: fetch+reset; localdir: no-op).
Sync(ctx context.Context) error
List(ctx context.Context) ([]FileMeta, error)
Read(ctx context.Context, relPath string) (io.ReadCloser, error)
// URI renders the canonical identifier for a file (file://..., git remote).
URI(relPath string) string
}
Source is one ingestion pipeline's origin. List returns only indexable files: sources filter by include/exclude globs and the extractor extension allowlist, so nothing unindexable ever reaches a manifest.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package gitrepo is the git source: a repository shallow-cloned into a cache directory and kept fresh by polling.
|
Package gitrepo is the git source: a repository shallow-cloned into a cache directory and kept fresh by polling. |
|
Package localdir is the filesystem source: a directory walked (and later watched) for indexable files.
|
Package localdir is the filesystem source: a directory walked (and later watched) for indexable files. |
|
Package s3 is the object-storage source: an S3 or S3-compatible bucket (MinIO, Ceph RGW) listed by poll and read on demand.
|
Package s3 is the object-storage source: an S3 or S3-compatible bucket (MinIO, Ceph RGW) listed by poll and read on demand. |
Click to show internal directories.
Click to hide internal directories.