mythicbeasts: implement ProviderTimeout (#1358)

This commit is contained in:
Mark Scott 2021-02-27 17:32:18 +00:00 committed by GitHub
parent 22a991d8cc
commit 2871fd3938
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,7 +71,7 @@ type DNSProvider struct {
// NewDNSProvider returns a DNSProvider instance configured for mythicbeasts DNSv2 API.
// Credentials must be passed in the environment variables:
// MYTHICBEASTS_USER_NAME and MYTHICBEASTS_PASSWORD.
// MYTHICBEASTS_USERNAME and MYTHICBEASTS_PASSWORD.
func NewDNSProvider() (*DNSProvider, error) {
values, err := env.Get(EnvUserName, EnvPassword)
if err != nil {
@ -152,3 +152,9 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
return nil
}
// Timeout returns the timeout and interval to use when checking for DNS propagation.
// Adjusting here to cope with spikes in propagation times.
func (d *DNSProvider) Timeout() (timeout, interval time.Duration) {
return d.config.PropagationTimeout, d.config.PollingInterval
}