1
0
mirror of https://github.com/go-acme/lego.git synced 2024-12-23 01:07:23 +02:00

exec: add detected variable to handle sequence interval (#1510)

This commit is contained in:
raunsbaekdk 2021-10-21 23:33:38 +02:00 committed by GitHub
parent df54dd233a
commit 18bcc0fa0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View File

@ -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_PROPAGATION_TIMEOUT` | Maximum waiting time for DNS propagation. |
| `EXEC_SEQUENCE_INTERVAL` | Time between sequential requests. |
## Description

View File

@ -22,6 +22,7 @@ const (
EnvPropagationTimeout = envNamespace + "PROPAGATION_TIMEOUT"
EnvPollingInterval = envNamespace + "POLLING_INTERVAL"
EnvSequenceInterval = envNamespace + "SEQUENCE_INTERVAL"
)
// Config Provider configuration.
@ -30,6 +31,7 @@ type Config struct {
Mode string
PropagationTimeout time.Duration
PollingInterval time.Duration
SequenceInterval time.Duration
}
// NewDefaultConfig returns a default configuration for the DNSProvider.
@ -37,6 +39,7 @@ func NewDefaultConfig() *Config {
return &Config{
PropagationTimeout: env.GetOrDefaultSecond(EnvPropagationTimeout, dns01.DefaultPropagationTimeout),
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.
// Returns the interval between each iteration.
func (d *DNSProvider) Sequential() time.Duration {
return d.config.PropagationTimeout
return d.config.SequenceInterval
}

View File

@ -25,6 +25,7 @@ Additional = '''
|----------------------------|-------------------------------------------|
| `EXEC_POLLING_INTERVAL` | Time between DNS propagation check. |
| `EXEC_PROPAGATION_TIMEOUT` | Maximum waiting time for DNS propagation. |
| `EXEC_SEQUENCE_INTERVAL` | Time between sequential requests. |
## Description