mirror of
https://github.com/go-acme/lego.git
synced 2024-12-23 09:15:11 +02:00
exec: add detected variable to handle sequence interval (#1510)
This commit is contained in:
parent
df54dd233a
commit
18bcc0fa0c
@ -42,6 +42,7 @@ lego --email myemail@example.com --dns exec --domains my.example.org run
|
|||||||
|----------------------------|-------------------------------------------|
|
|----------------------------|-------------------------------------------|
|
||||||
| `EXEC_POLLING_INTERVAL` | Time between DNS propagation check. |
|
| `EXEC_POLLING_INTERVAL` | Time between DNS propagation check. |
|
||||||
| `EXEC_PROPAGATION_TIMEOUT` | Maximum waiting time for DNS propagation. |
|
| `EXEC_PROPAGATION_TIMEOUT` | Maximum waiting time for DNS propagation. |
|
||||||
|
| `EXEC_SEQUENCE_INTERVAL` | Time between sequential requests. |
|
||||||
|
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
@ -22,6 +22,7 @@ const (
|
|||||||
|
|
||||||
EnvPropagationTimeout = envNamespace + "PROPAGATION_TIMEOUT"
|
EnvPropagationTimeout = envNamespace + "PROPAGATION_TIMEOUT"
|
||||||
EnvPollingInterval = envNamespace + "POLLING_INTERVAL"
|
EnvPollingInterval = envNamespace + "POLLING_INTERVAL"
|
||||||
|
EnvSequenceInterval = envNamespace + "SEQUENCE_INTERVAL"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Config Provider configuration.
|
// Config Provider configuration.
|
||||||
@ -30,6 +31,7 @@ type Config struct {
|
|||||||
Mode string
|
Mode string
|
||||||
PropagationTimeout time.Duration
|
PropagationTimeout time.Duration
|
||||||
PollingInterval time.Duration
|
PollingInterval time.Duration
|
||||||
|
SequenceInterval time.Duration
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewDefaultConfig returns a default configuration for the DNSProvider.
|
// NewDefaultConfig returns a default configuration for the DNSProvider.
|
||||||
@ -37,6 +39,7 @@ func NewDefaultConfig() *Config {
|
|||||||
return &Config{
|
return &Config{
|
||||||
PropagationTimeout: env.GetOrDefaultSecond(EnvPropagationTimeout, dns01.DefaultPropagationTimeout),
|
PropagationTimeout: env.GetOrDefaultSecond(EnvPropagationTimeout, dns01.DefaultPropagationTimeout),
|
||||||
PollingInterval: env.GetOrDefaultSecond(EnvPollingInterval, dns01.DefaultPollingInterval),
|
PollingInterval: env.GetOrDefaultSecond(EnvPollingInterval, dns01.DefaultPollingInterval),
|
||||||
|
SequenceInterval: env.GetOrDefaultSecond(EnvSequenceInterval, dns01.DefaultPropagationTimeout),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,5 +122,5 @@ func (d *DNSProvider) Timeout() (timeout, interval time.Duration) {
|
|||||||
// Sequential All DNS challenges for this provider will be resolved sequentially.
|
// Sequential All DNS challenges for this provider will be resolved sequentially.
|
||||||
// Returns the interval between each iteration.
|
// Returns the interval between each iteration.
|
||||||
func (d *DNSProvider) Sequential() time.Duration {
|
func (d *DNSProvider) Sequential() time.Duration {
|
||||||
return d.config.PropagationTimeout
|
return d.config.SequenceInterval
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@ Additional = '''
|
|||||||
|----------------------------|-------------------------------------------|
|
|----------------------------|-------------------------------------------|
|
||||||
| `EXEC_POLLING_INTERVAL` | Time between DNS propagation check. |
|
| `EXEC_POLLING_INTERVAL` | Time between DNS propagation check. |
|
||||||
| `EXEC_PROPAGATION_TIMEOUT` | Maximum waiting time for DNS propagation. |
|
| `EXEC_PROPAGATION_TIMEOUT` | Maximum waiting time for DNS propagation. |
|
||||||
|
| `EXEC_SEQUENCE_INTERVAL` | Time between sequential requests. |
|
||||||
|
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
Loading…
Reference in New Issue
Block a user