Documentation
¶
Index ¶
- func NewSQLIndex(cfg SQLIndexConfig, _ SQLIndexDeps) (capsessionindex.Service, error)
- type SQLIndex
- func (s *SQLIndex) ListSessions(ctx context.Context, limit int) ([]capsessionindex.SessionSummary, error)
- func (s *SQLIndex) ScrollMessages(ctx context.Context, sessionID string, anchorSeq int64, before, after int) ([]capsessionindex.MessageRow, error)
- func (s *SQLIndex) Search(ctx context.Context, query string, limit int) ([]capsessionindex.Hit, error)
- func (s *SQLIndex) SyncSessions(ctx context.Context) error
- type SQLIndexConfig
- type SQLIndexDeps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSQLIndex ¶
func NewSQLIndex(cfg SQLIndexConfig, _ SQLIndexDeps) (capsessionindex.Service, error)
NewSQLIndex registers session/sql-index: FTS over session/sql durable events.
Types ¶
type SQLIndex ¶
type SQLIndex struct {
// contains filtered or unexported fields
}
SQLIndex derives a searchable transcript index from session/sql durable events.
func (*SQLIndex) ListSessions ¶
func (s *SQLIndex) ListSessions(ctx context.Context, limit int) ([]capsessionindex.SessionSummary, error)
func (*SQLIndex) ScrollMessages ¶
func (s *SQLIndex) ScrollMessages(ctx context.Context, sessionID string, anchorSeq int64, before, after int) ([]capsessionindex.MessageRow, error)
type SQLIndexConfig ¶
type SQLIndexConfig struct {
// Driver is database/sql driver name: sqlite, pgx (postgres), or any registered driver.
Driver string `json:"driver"`
// DSN is the driver data source name; should match the session/sql store DSN.
DSN string `json:"dsn"`
}
SQLIndexConfig mirrors session/sql connection settings so the index lives in the same database as ak_session_events (one DSN to persist in Docker).
func (*SQLIndexConfig) Validate ¶
func (c *SQLIndexConfig) Validate() error
Validate implements pluginkit.Validator.
type SQLIndexDeps ¶
type SQLIndexDeps struct{}
Click to show internal directories.
Click to hide internal directories.