Merge pull request #22 from alexgridx/21-allow-overwriting-postgres-connection
#21 allows to overwrite postgres connection
This commit is contained in:
commit
bbe5ed2a22
1 changed files with 7 additions and 0 deletions
|
|
@ -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
|
// Checkpoint stores and retrieves the last evaluated key from a DDB scan
|
||||||
type Checkpoint struct {
|
type Checkpoint struct {
|
||||||
appName string
|
appName string
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue