1 package challenge
2 3 import "time"
4 5 // Provider enables implementing a custom challenge
6 // provider. Present presents the solution to a challenge available to
7 // be solved. CleanUp will be called by the challenge if Present ends
8 // in a non-error state.
9 type Provider interface {
10 Present(domain, token, keyAuth string) error
11 CleanUp(domain, token, keyAuth string) error
12 }
13 14 // ProviderTimeout allows for implementing a
15 // Provider where an unusually long timeout is required when
16 // waiting for an ACME challenge to be satisfied, such as when
17 // checking for DNS record propagation. If an implementor of a
18 // Provider provides a Timeout method, then the return values
19 // of the Timeout method will be used when appropriate by the acme
20 // package. The interval value is the time between checks.
21 //
22 // The default values used for timeout and interval are 60 seconds and
23 // 2 seconds respectively. These are used when no Timeout method is
24 // defined for the Provider.
25 type ProviderTimeout interface {
26 Provider
27 Timeout() (timeout, interval time.Duration)
28 }
29