Documentation
¶
Overview ¶
Package sync handles repository ingestion from GitHub.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateMaxCharsFromTokens ¶ added in v0.2.0
CalculateMaxCharsFromTokens calculates the maximum characters based on token limit. Uses a conservative ratio of ~3.3 characters per token to stay safely under limits. This accounts for worst-case scenarios with special characters and encoding overhead.
func IngestRepos ¶
func IngestRepos(ctx context.Context, opts IngestOptions) <-chan IngestEvent
IngestRepos runs the full ingestion pipeline. Events are sent to the returned channel as repos are processed. The channel is closed when ingestion completes. Never panics — all errors are sent as IngestEvent{Type: "error"}.
Types ¶
type IngestEvent ¶
type IngestEvent struct {
Type string // "repo", "skip", "error", "done"
Repo string
Status string // "new" or "updated" for type=="repo"
Reason string // for type=="skip" or "error"
Total int
Skipped int
Errors int
}
IngestEvent represents a progress event from the ingestion pipeline.
Click to show internal directories.
Click to hide internal directories.