#21 allows to overwrite postgres connection
This commit is contained in:
parent
c372167032
commit
1e621394d5
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