diff --git a/store/postgres/postgres.go b/store/postgres/postgres.go index 70c41b9..909e09d 100644 --- a/store/postgres/postgres.go +++ b/store/postgres/postgres.go @@ -26,6 +26,13 @@ func WithMaxInterval(maxInterval time.Duration) Option { } } +// WithConnection overwrites the default sql.DB +func WithConnection(connection *sql.DB) Option { + return func(c *Checkpoint) { + c.conn = connection + } +} + // Checkpoint stores and retrieves the last evaluated key from a DDB scan type Checkpoint struct { appName string