Documentation
¶
Index ¶
- type Orchestrator
- func (o *Orchestrator) ExecuteWithDualWrite(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
- func (o *Orchestrator) GetStats() Stats
- func (o *Orchestrator) InterceptAndRewrite(query string) (string, error)
- func (o *Orchestrator) QueryWithDualWrite(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
- type Stats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Orchestrator ¶
type Orchestrator struct {
// contains filtered or unexported fields
}
Orchestrator manages dual-write operations
func NewOrchestrator ¶
func NewOrchestrator(db *sql.DB, cfg *config.Config) *Orchestrator
NewOrchestrator creates a new dual-write orchestrator
func (*Orchestrator) ExecuteWithDualWrite ¶
func (o *Orchestrator) ExecuteWithDualWrite(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
ExecuteWithDualWrite executes a query with dual-write transformation
func (*Orchestrator) GetStats ¶
func (o *Orchestrator) GetStats() Stats
GetStats returns current statistics (placeholder for metrics)
func (*Orchestrator) InterceptAndRewrite ¶
func (o *Orchestrator) InterceptAndRewrite(query string) (string, error)
InterceptAndRewrite intercepts a query and rewrites it for dual-write if needed
func (*Orchestrator) QueryWithDualWrite ¶
func (o *Orchestrator) QueryWithDualWrite(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
QueryWithDualWrite executes a SELECT query (no transformation needed, but kept for consistency)
Click to show internal directories.
Click to hide internal directories.