mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
21 lines
346 B
Go
21 lines
346 B
Go
package redis
|
|
|
|
import (
|
|
"github.com/crawlab-team/crawlab/db"
|
|
"time"
|
|
)
|
|
|
|
type Option func(c db.RedisClient)
|
|
|
|
func WithBackoffMaxInterval(interval time.Duration) Option {
|
|
return func(c db.RedisClient) {
|
|
c.SetBackoffMaxInterval(interval)
|
|
}
|
|
}
|
|
|
|
func WithTimeout(timeout int) Option {
|
|
return func(c db.RedisClient) {
|
|
c.SetTimeout(timeout)
|
|
}
|
|
}
|