Merge pull request #22 from alexgridx/21-allow-overwriting-postgres-connection

#21 allows to overwrite postgres connection
This commit is contained in:
Alex 2024-04-19 17:11:50 +02:00 committed by GitHub
commit bbe5ed2a22
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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