http.go (traefik-v2.3.2.src) | : | http.go (traefik-v2.3.3.src) | ||
---|---|---|---|---|
skipping to change at line 27 | skipping to change at line 27 | |||
"github.com/traefik/traefik/v2/pkg/provider" | "github.com/traefik/traefik/v2/pkg/provider" | |||
"github.com/traefik/traefik/v2/pkg/safe" | "github.com/traefik/traefik/v2/pkg/safe" | |||
"github.com/traefik/traefik/v2/pkg/tls" | "github.com/traefik/traefik/v2/pkg/tls" | |||
"github.com/traefik/traefik/v2/pkg/types" | "github.com/traefik/traefik/v2/pkg/types" | |||
) | ) | |||
var _ provider.Provider = (*Provider)(nil) | var _ provider.Provider = (*Provider)(nil) | |||
// Provider is a provider.Provider implementation that queries an HTTP(s) endpoi nt for a configuration. | // Provider is a provider.Provider implementation that queries an HTTP(s) endpoi nt for a configuration. | |||
type Provider struct { | type Provider struct { | |||
Endpoint string `description:"Load configuration f | Endpoint string `description:"Load configuration f | |||
rom this endpoint." json:"endpoint" toml:"endpoint" yaml:"endpoint" export:"true | rom this endpoint." json:"endpoint" toml:"endpoint" yaml:"endpoint"` | |||
"` | PollInterval ptypes.Duration `description:"Polling interval for | |||
PollInterval ptypes.Duration `description:"Polling interval for | endpoint." json:"pollInterval,omitempty" toml:"pollInterval,omitempty" yaml:"po | |||
endpoint." json:"pollInterval,omitempty" toml:"pollInterval,omitempty" yaml:"po | llInterval,omitempty" export:"true"` | |||
llInterval,omitempty"` | PollTimeout ptypes.Duration `description:"Polling timeout for | |||
PollTimeout ptypes.Duration `description:"Polling timeout for | endpoint." json:"pollTimeout,omitempty" toml:"pollTimeout,omitempty" yaml:"pollT | |||
endpoint." json:"pollTimeout,omitempty" toml:"pollTimeout,omitempty" yaml:"pollT | imeout,omitempty" export:"true"` | |||
imeout,omitempty"` | ||||
TLS *types.ClientTLS `description:"Enable TLS support." json:"tls,omitempty" toml:"tls,omitempty" yaml:"tls,omitempty" export:"true"` | TLS *types.ClientTLS `description:"Enable TLS support." json:"tls,omitempty" toml:"tls,omitempty" yaml:"tls,omitempty" export:"true"` | |||
httpClient *http.Client | httpClient *http.Client | |||
lastConfigurationHash uint64 | lastConfigurationHash uint64 | |||
} | } | |||
// SetDefaults sets the default values. | // SetDefaults sets the default values. | |||
func (p *Provider) SetDefaults() { | func (p *Provider) SetDefaults() { | |||
p.PollInterval = ptypes.Duration(5 * time.Second) | p.PollInterval = ptypes.Duration(5 * time.Second) | |||
p.PollTimeout = ptypes.Duration(5 * time.Second) | p.PollTimeout = ptypes.Duration(5 * time.Second) | |||
} | } | |||
End of changes. 1 change blocks. | ||||
9 lines changed or deleted | 8 lines changed or added |