qbtrade/pkg/exchange/batch/option.go

13 lines
287 B
Go
Raw Normal View History

2024-06-27 14:42:38 +00:00
package batch
import "time"
type Option func(query *AsyncTimeRangedBatchQuery)
// JumpIfEmpty jump the startTime + duration when the result is empty
func JumpIfEmpty(duration time.Duration) Option {
return func(query *AsyncTimeRangedBatchQuery) {
query.JumpIfEmpty = duration
}
}