Documentation
¶
Overview ¶
Package http implements the REST API server for Cortex.
It exposes observation, session, search, graph, and scoring endpoints using the standard library net/http package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deps ¶
type Deps struct {
Observations ObservationStore
Sessions *session.Store
Search *search.Store
Prompts *prompt.Store
Graph *graphstore.Store
Scoring *scoringstore.Store
TemporalSnapshots *sqlitestore.TemporalSnapshotRepository
Vectors domain.VectorIndex
Embeddings embedding.Service
}
Deps bundles store dependencies for HTTP handlers.
type ObservationStore ¶ added in v2.3.10
type ObservationStore interface {
domain.ObservationRepository
DB() *sql.DB
ExportAll(ctx context.Context) (*sqlitestore.ExportData, error)
ImportData(ctx context.Context, data *sqlitestore.ExportData) (*sqlitestore.SyncImportResult, error)
}
ObservationStore captures observation persistence and data import/export capabilities required by the HTTP server.
type Options ¶
type Options struct {
AuthToken string
AllowedOrigins []string
// WebHandler, when non-nil, serves the embedded web UI for every path not
// owned by an explicit API or health route. It is mounted as the root
// fallback so /api/* and /health keep their exact existing contracts.
WebHandler http.Handler
}
Options configures optional HTTP hardening behavior.
Click to show internal directories.
Click to hide internal directories.