Fix postgres primary/replica races

This commit is contained in:
binwiederhier
2026-03-16 11:21:21 -04:00
parent df82fdf44c
commit 59ce581ba2
2 changed files with 37 additions and 15 deletions
+6
View File
@@ -11,6 +11,12 @@ type Beginner interface {
Begin() (*sql.Tx, error)
}
// Querier is an interface for types that can execute SQL queries.
// *sql.DB, *sql.Tx, and *DB all implement this.
type Querier interface {
Query(query string, args ...any) (*sql.Rows, error)
}
// Host pairs a *sql.DB with the host:port it was opened against.
type Host struct {
Addr string // "host:port"