mirror of https://github.com/status-im/consul.git
Make LockDelay configurable in api locks (#8621)
This commit is contained in:
parent
7cde9c6788
commit
c9c9e4face
|
@ -79,6 +79,7 @@ type LockOptions struct {
|
|||
MonitorRetryTime time.Duration // Optional, defaults to DefaultMonitorRetryTime
|
||||
LockWaitTime time.Duration // Optional, defaults to DefaultLockWaitTime
|
||||
LockTryOnce bool // Optional, defaults to false which means try forever
|
||||
LockDelay time.Duration // Optional, defaults to 15s
|
||||
Namespace string `json:",omitempty"` // Optional, defaults to API client config, namespace of ACL token, or "default" namespace
|
||||
}
|
||||
|
||||
|
@ -353,6 +354,7 @@ func (l *Lock) createSession() (string, error) {
|
|||
se = &SessionEntry{
|
||||
Name: l.opts.SessionName,
|
||||
TTL: l.opts.SessionTTL,
|
||||
LockDelay: l.opts.LockDelay,
|
||||
}
|
||||
}
|
||||
w := WriteOptions{Namespace: l.opts.Namespace}
|
||||
|
|
Loading…
Reference in New Issue