Adding Option func to set maxInterval (#60)
This commit is contained in:
parent
9ccee87b62
commit
cf5d22abff
1 changed files with 7 additions and 0 deletions
|
|
@ -29,6 +29,13 @@ type key struct {
|
|||
// Option is used to override defaults when creating a new Checkpoint
|
||||
type Option func(*Checkpoint)
|
||||
|
||||
// WithMaxInterval sets the flush interval
|
||||
func WithMaxInterval(maxInterval time.Duration) Option {
|
||||
return func(c *Checkpoint) {
|
||||
c.maxInterval = maxInterval
|
||||
}
|
||||
}
|
||||
|
||||
// Checkpoint stores and retreives the last evaluated key from a DDB scan
|
||||
type Checkpoint struct {
|
||||
appName string
|
||||
|
|
|
|||
Loading…
Reference in a new issue