- Add worker storage layer with PostgreSQL/sqlc setup - Add migration files for worker backbone schema - Add job runner and built-in jobs implementation - Add Redis key definitions for worker state management - Archive socket-session-loop milestone (completed/renamed) - Update roadmap current.md and foundation-alignment phase - Add socket endpoint integration and runtime smoke tests - Add infra-check, worker-storage-check, worker-storage-gen CLI tools - Update API socket server and config - Add pubspec dependencies and client socket endpoint changes - Add config tests for API and worker services
25 lines
785 B
Go
25 lines
785 B
Go
package storage
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
"git.toki-labs.com/toki/alt/packages/domain/backtest"
|
|
"git.toki-labs.com/toki/alt/packages/domain/market"
|
|
)
|
|
|
|
type InstrumentStore interface {
|
|
UpsertInstrument(ctx context.Context, inst market.Instrument) error
|
|
GetInstrument(ctx context.Context, id market.InstrumentID) (market.Instrument, error)
|
|
ListInstruments(ctx context.Context) ([]market.Instrument, error)
|
|
}
|
|
|
|
type BarStore interface {
|
|
UpsertBar(ctx context.Context, bar market.Bar) error
|
|
GetBars(ctx context.Context, id market.InstrumentID, timeframe market.Timeframe, from, to time.Time) ([]market.Bar, error)
|
|
}
|
|
|
|
type BacktestRunStore interface {
|
|
UpsertRun(ctx context.Context, run backtest.Run) error
|
|
GetRun(ctx context.Context, id backtest.RunID) (backtest.Run, error)
|
|
}
|