Documentation
¶
Index ¶
- type Member
- type ReadRepository
- func (r *ReadRepository) CandidateNodes(ctx context.Context) ([]graph.Node, error)
- func (r *ReadRepository) CanonicalMessages(ctx context.Context, request graph.CanonicalMessageQuery) (graph.CanonicalMessagePage, error)
- func (r *ReadRepository) Close() error
- func (r *ReadRepository) Counts(ctx context.Context) (graph.Counts, error)
- func (r *ReadRepository) EdgesFrom(ctx context.Context, id string) ([]graph.Edge, error)
- func (r *ReadRepository) EdgesTo(ctx context.Context, id string) ([]graph.Edge, error)
- func (r *ReadRepository) ListNodesByKind(ctx context.Context, request graph.NodeListQuery) ([]graph.ScopedNode, error)
- func (r *ReadRepository) MatchNodes(ctx context.Context, request graph.NodeMatchQuery) (graph.NodeMatchGroup, error)
- func (r *ReadRepository) Members() []Member
- func (r *ReadRepository) Meta(ctx context.Context, key string) (string, error)
- func (r *ReadRepository) Node(ctx context.Context, id string) (graph.Node, error)
- func (r *ReadRepository) ProjectForNode(ctx context.Context, id string) (indexer.Project, error)
- func (r *ReadRepository) Projects() []indexer.Project
- func (r *ReadRepository) RelationEdges(ctx context.Context, request graph.RelationEdgeQuery) (graph.RelationEdgePage, error)
- func (r *ReadRepository) Repositories(ctx context.Context) ([]string, error)
- func (r *ReadRepository) SearchNodes(ctx context.Context, term string, limit int) ([]graph.Node, error)
- type Repository
- func (r *Repository) CandidateNodes(ctx context.Context) ([]graph.Node, error)
- func (r *Repository) CanonicalMessages(ctx context.Context, request graph.CanonicalMessageQuery) (graph.CanonicalMessagePage, error)
- func (r *Repository) Close() error
- func (r *Repository) Counts(ctx context.Context) (graph.Counts, error)
- func (r *Repository) EdgesFrom(ctx context.Context, id string) ([]graph.Edge, error)
- func (r *Repository) EdgesTo(ctx context.Context, id string) ([]graph.Edge, error)
- func (r *Repository) ListNodesByKind(ctx context.Context, request graph.NodeListQuery) ([]graph.ScopedNode, error)
- func (r *Repository) MatchNodes(ctx context.Context, request graph.NodeMatchQuery) (graph.NodeMatchGroup, error)
- func (r *Repository) Members() []Member
- func (r *Repository) Meta(ctx context.Context, key string) (string, error)
- func (r *Repository) Node(ctx context.Context, id string) (graph.Node, error)
- func (r *Repository) ProjectForNode(ctx context.Context, id string) (indexer.Project, error)
- func (r *Repository) Projects() []indexer.Project
- func (r *Repository) Refresh(ctx context.Context, parsers *parserapi.Registry) error
- func (r *Repository) RefreshReports(ctx context.Context, parsers *parserapi.Registry, options indexer.Options) ([]indexer.Report, error)
- func (r *Repository) RelationEdges(ctx context.Context, request graph.RelationEdgeQuery) (graph.RelationEdgePage, error)
- func (r *Repository) Repositories(_ context.Context) ([]string, error)
- func (r *Repository) SearchNodes(ctx context.Context, term string, limit int) ([]graph.Node, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Member ¶
type Member struct {
Project indexer.Project
Files graph.FileCatalog
}
Member pairs one federated index with its project so callers can build per-repository services without reaching into federation internals.
type ReadRepository ¶
type ReadRepository struct {
// contains filtered or unexported fields
}
ReadRepository exposes the federated read surface without refresh, indexing, or embedding-write methods.
func OpenReadOnly ¶
func OpenReadOnly(ctx context.Context, paths []string) (*ReadRepository, error)
OpenReadOnly opens existing compatible indexes without migrations or write capabilities and federates their query surfaces.
func OpenReadOnlyProjects ¶
OpenReadOnlyProjects opens the exact discovered project generations supplied by a freshness coordinator. Unlike OpenReadOnly, it does not rediscover roots between the coordinator's stable post-refresh probe and publication.
func (*ReadRepository) CandidateNodes ¶
func (*ReadRepository) CanonicalMessages ¶
func (r *ReadRepository) CanonicalMessages(ctx context.Context, request graph.CanonicalMessageQuery) (graph.CanonicalMessagePage, error)
func (*ReadRepository) Close ¶
func (r *ReadRepository) Close() error
func (*ReadRepository) ListNodesByKind ¶
func (r *ReadRepository) ListNodesByKind(ctx context.Context, request graph.NodeListQuery) ([]graph.ScopedNode, error)
func (*ReadRepository) MatchNodes ¶
func (r *ReadRepository) MatchNodes(ctx context.Context, request graph.NodeMatchQuery) (graph.NodeMatchGroup, error)
func (*ReadRepository) Members ¶
func (r *ReadRepository) Members() []Member
func (*ReadRepository) ProjectForNode ¶
func (*ReadRepository) Projects ¶
func (r *ReadRepository) Projects() []indexer.Project
func (*ReadRepository) RelationEdges ¶
func (r *ReadRepository) RelationEdges(ctx context.Context, request graph.RelationEdgeQuery) (graph.RelationEdgePage, error)
func (*ReadRepository) Repositories ¶
func (r *ReadRepository) Repositories(ctx context.Context) ([]string, error)
func (*ReadRepository) SearchNodes ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository presents multiple branch-specific SQLite indexes as one read-only graph and resolves explicit external targets against declarations in peers.
func OpenProjects ¶
OpenProjects opens the exact already-discovered writable project indexes. It is intended for generation-bound auxiliary writes such as embeddings; source indexing remains owned by the freshness coordinator.
func (*Repository) CandidateNodes ¶
func (*Repository) CanonicalMessages ¶
func (r *Repository) CanonicalMessages(ctx context.Context, request graph.CanonicalMessageQuery) (graph.CanonicalMessagePage, error)
CanonicalMessages merges already-filtered member pages, then applies one repository-qualified deterministic global bound.
func (*Repository) Close ¶
func (r *Repository) Close() error
func (*Repository) ListNodesByKind ¶
func (r *Repository) ListNodesByKind(ctx context.Context, request graph.NodeListQuery) ([]graph.ScopedNode, error)
ListNodesByKind enumerates catalog nodes across members and attributes each one to the repository that declares it. The per-kind bound applies to every member, so the caller still applies its own total bound.
func (*Repository) MatchNodes ¶
func (r *Repository) MatchNodes(ctx context.Context, request graph.NodeMatchQuery) (graph.NodeMatchGroup, error)
MatchNodes merges the per-member match evidence for a selector. Only the strongest evidence any member reported contributes - the strongest level, and within it a local group over an external fallback - because a member holding stronger evidence always reports it itself. Totals sum across the contributing members so a federated ambiguity still states the true count.
func (*Repository) Members ¶
func (r *Repository) Members() []Member
Members returns each federated index in deterministic order.
func (*Repository) ProjectForNode ¶
func (*Repository) Projects ¶
func (r *Repository) Projects() []indexer.Project
func (*Repository) RefreshReports ¶
func (r *Repository) RefreshReports(ctx context.Context, parsers *parserapi.Registry, options indexer.Options) ([]indexer.Report, error)
RefreshReports refreshes members in canonical order and returns only reports for successful members. A failure is terminal and is never represented as a successful federation refresh.
func (*Repository) RelationEdges ¶
func (r *Repository) RelationEdges(ctx context.Context, request graph.RelationEdgeQuery) (graph.RelationEdgePage, error)
RelationEdges merges bounded hydrated pages from every member, applies the same cross-repository projection as traversal adjacency, then deduplicates and enforces the global per-relation bound on final edge identities.
func (*Repository) Repositories ¶
func (r *Repository) Repositories(_ context.Context) ([]string, error)
Repositories names every indexed repository in this federation.