forked from TrueCloudLab/lego
exec: add detected variable to handle sequence interval (#1510)
This commit is contained in:
parent
df54dd233a
commit
18bcc0fa0c
3 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue