Documentation
¶
Index ¶
- Variables
- func NewRedisLocker(r redis.UniversalClient, options ...redsync.Option) (gocron.Locker, error)
- func NewRedisLockerAlways(r redis.UniversalClient, options ...redsync.Option) (gocron.Locker, error)
- func NewRedisLockerWithOptions(r redis.UniversalClient, options ...LockerOption) (gocron.Locker, error)
- type LockerOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( WithExpiry = redsync.WithExpiry WithDriftFactor = redsync.WithDriftFactor WithGenValueFunc = redsync.WithGenValueFunc WithRetryDelay = redsync.WithRetryDelay WithRetryDelayFunc = redsync.WithRetryDelayFunc WithTimeoutFactor = redsync.WithTimeoutFactor WithTries = redsync.WithTries WithValue = redsync.WithValue )
alias options
Functions ¶
func NewRedisLocker ¶
NewRedisLocker provides an implementation of the Locker interface using redis for storage.
func NewRedisLockerAlways ¶ added in v1.2.0
func NewRedisLockerAlways(r redis.UniversalClient, options ...redsync.Option) (gocron.Locker, error)
NewRedisLockerAlways provides an implementation of the Locker interface using redis for storage, even if the connection fails.
func NewRedisLockerWithOptions ¶ added in v1.3.0
func NewRedisLockerWithOptions(r redis.UniversalClient, options ...LockerOption) (gocron.Locker, error)
Types ¶
type LockerOption ¶ added in v1.3.0
type LockerOption func(*redisLocker)
func WithAutoExtendDuration ¶ added in v1.3.0
func WithAutoExtendDuration(duration time.Duration) LockerOption
func WithRedsyncOptions ¶ added in v1.3.0
func WithRedsyncOptions(options ...redsync.Option) LockerOption
WithRedsyncOptions sets the redsync options.
Click to show internal directories.
Click to hide internal directories.