Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
analytics
command
Command analytics starts the standalone analytics aggregation service.
|
Command analytics starts the standalone analytics aggregation service. |
|
auth
command
Command auth is a CLI tool for managing gateway API keys stored in PostgreSQL.
|
Command auth is a CLI tool for managing gateway API keys stored in PostgreSQL. |
|
gateway
command
Command gateway starts the API gateway service.
|
Command gateway starts the API gateway service. |
|
indexer
command
Command indexer starts the document indexing service.
|
Command indexer starts the document indexing service. |
|
ingestion
command
Command ingestion starts the document ingestion HTTP service.
|
Command ingestion starts the document ingestion HTTP service. |
|
loadtest
command
Command loadtest runs an HTTP load test against the search service.
|
Command loadtest runs an HTTP load test against the search service. |
|
searcher
command
Command searcher starts the distributed search service.
|
Command searcher starts the distributed search service. |
|
internal
|
|
|
analytics
Package analytics provides real-time search analytics collection and aggregation.
|
Package analytics provides real-time search analytics collection and aggregation. |
|
analytics/aggregator
Package aggregator provides persistent storage and periodic snapshotting of aggregated analytics stats to PostgreSQL.
|
Package aggregator provides persistent storage and periodic snapshotting of aggregated analytics stats to PostgreSQL. |
|
analytics/collector
Package collector provides a batch-oriented analytics event collector that accumulates events in memory and flushes them to Kafka in bulk.
|
Package collector provides a batch-oriented analytics event collector that accumulates events in memory and flushes them to Kafka in bulk. |
|
auth/apikey
Package apikey provides SHA-256-based API key validation against PostgreSQL.
|
Package apikey provides SHA-256-based API key validation against PostgreSQL. |
|
auth/ratelimit
Package ratelimit provides an in-memory token-bucket rate limiter.
|
Package ratelimit provides an in-memory token-bucket rate limiter. |
|
gateway/handler
Package handler implements the API gateway's HTTP endpoints.
|
Package handler implements the API gateway's HTTP endpoints. |
|
gateway/middleware
Package middleware provides HTTP middleware for the API gateway including authentication, CORS, and rate limiting.
|
Package middleware provides HTTP middleware for the API gateway including authentication, CORS, and rate limiting. |
|
gateway/router
Package router wires up all API gateway routes and applies the middleware chain (RequestID → CORS → Auth → RateLimit).
|
Package router wires up all API gateway routes and applies the middleware chain (RequestID → CORS → Auth → RateLimit). |
|
indexer
Package indexer implements the core indexing engine.
|
Package indexer implements the core indexing engine. |
|
indexer/consumer
Package consumer reads ingestion events from Kafka and indexes them via the indexer engine, optionally routing documents through the shard router for partitioned indexing.
|
Package consumer reads ingestion events from Kafka and indexes them via the indexer engine, optionally routing documents through the shard router for partitioned indexing. |
|
indexer/index
Package index defines the in-memory inverted-index data structures used by the indexer.
|
Package index defines the in-memory inverted-index data structures used by the indexer. |
|
indexer/segment
Package segment implements a custom binary segment file format (.spdx) for persisting inverted-index data to disk.
|
Package segment implements a custom binary segment file format (.spdx) for persisting inverted-index data to disk. |
|
indexer/shard
Package shard provides hash-based shard routing for index engines.
|
Package shard provides hash-based shard routing for index engines. |
|
indexer/tokenizer
Package tokenizer provides text tokenisation for the search engine.
|
Package tokenizer provides text tokenisation for the search engine. |
|
ingestion
Package ingestion defines the request/response types and Kafka event schemas used by the document ingestion pipeline.
|
Package ingestion defines the request/response types and Kafka event schemas used by the document ingestion pipeline. |
|
ingestion/handler
Package handler exposes the HTTP endpoints for the ingestion service, including document ingest and health check.
|
Package handler exposes the HTTP endpoints for the ingestion service, including document ingest and health check. |
|
ingestion/publisher
Package publisher persists documents to PostgreSQL and publishes ingest events to Kafka for downstream indexing.
|
Package publisher persists documents to PostgreSQL and publishes ingest events to Kafka for downstream indexing. |
|
ingestion/validator
Package validator provides input validation for ingestion requests.
|
Package validator provides input validation for ingestion requests. |
|
searcher/cache
Package cache provides a Redis-backed query cache with singleflight deduplication.
|
Package cache provides a Redis-backed query cache with singleflight deduplication. |
|
searcher/executor
Package executor runs parsed query plans against one or more indexer engines, applying Boolean filtering (AND/OR/NOT) and BM25 ranking.
|
Package executor runs parsed query plans against one or more indexer engines, applying Boolean filtering (AND/OR/NOT) and BM25 ranking. |
|
searcher/handler
Package handler exposes the search service HTTP endpoints including query execution, cache management, and health checks.
|
Package handler exposes the search service HTTP endpoints including query execution, cache management, and health checks. |
|
searcher/merger
Package merger provides a min-heap based merge of scored results from multiple shards, returning the global top-K documents.
|
Package merger provides a min-heap based merge of scored results from multiple shards, returning the global top-K documents. |
|
searcher/parser
Package parser converts raw search query strings into structured QueryPlan objects, recognising AND, OR, and NOT operators and delegating token normalisation to the indexer tokenizer.
|
Package parser converts raw search query strings into structured QueryPlan objects, recognising AND, OR, and NOT operators and delegating token normalisation to the indexer tokenizer. |
|
searcher/ranker
Package ranker implements BM25 relevance scoring for search results.
|
Package ranker implements BM25 relevance scoring for search results. |
|
pkg
|
|
|
config
Package config loads and validates application configuration from YAML files with environment-variable overrides.
|
Package config loads and validates application configuration from YAML files with environment-variable overrides. |
|
errors
Package errors defines sentinel errors and a structured AppError type used across the platform.
|
Package errors defines sentinel errors and a structured AppError type used across the platform. |
|
grpc
Package grpc provides a lightweight JSON-over-TCP RPC framework for internal service-to-service communication.
|
Package grpc provides a lightweight JSON-over-TCP RPC framework for internal service-to-service communication. |
|
health
Package health provides a concurrent health-check framework.
|
Package health provides a concurrent health-check framework. |
|
kafka
Package kafka provides Kafka producer and consumer clients backed by segmentio/kafka-go.
|
Package kafka provides Kafka producer and consumer clients backed by segmentio/kafka-go. |
|
logger
Package logger configures the global slog logger and provides helpers to propagate request-scoped fields (such as request IDs) through context.
|
Package logger configures the global slog logger and provides helpers to propagate request-scoped fields (such as request IDs) through context. |
|
metrics
Package metrics defines the Prometheus metric collectors used across the platform and exposes an HTTP handler for scraping.
|
Package metrics defines the Prometheus metric collectors used across the platform and exposes an HTTP handler for scraping. |
|
middleware
Package middleware provides reusable HTTP middleware for request IDs, Prometheus metrics, and request timeouts.
|
Package middleware provides reusable HTTP middleware for request IDs, Prometheus metrics, and request timeouts. |
|
postgres
Package postgres provides a thin wrapper around database/sql with connection-pool configuration, health-check support, and a transactional helper (InTx).
|
Package postgres provides a thin wrapper around database/sql with connection-pool configuration, health-check support, and a transactional helper (InTx). |
|
proto
Package proto defines the shared message types used for internal RPC communication between services in the Distributed Search & Analytics Platform.
|
Package proto defines the shared message types used for internal RPC communication between services in the Distributed Search & Analytics Platform. |
|
redis
Package redis provides a thin wrapper around go-redis/v9 with connection pooling, cache get/set/delete operations, and pattern-based key invalidation.
|
Package redis provides a thin wrapper around go-redis/v9 with connection pooling, cache get/set/delete operations, and pattern-based key invalidation. |
|
resilience
Package resilience provides fault-tolerance primitives: a circuit breaker, exponential-backoff retry, and a context-based timeout wrapper.
|
Package resilience provides fault-tolerance primitives: a circuit breaker, exponential-backoff retry, and a context-based timeout wrapper. |
|
tracing
Package tracing provides a lightweight span-based tracing system that propagates trace context through Go contexts.
|
Package tracing provides a lightweight span-based tracing system that propagates trace context through Go contexts. |
Click to show internal directories.
Click to hide internal directories.