caddy-dns / route53

Caddy module: dns.providers.route53
MIT License
38 stars 31 forks source link

This module needs to use Provision() #2

Closed mholt closed 4 years ago

mholt commented 4 years ago

The libdns/route53 package has a NewSession() method: https://github.com/caddy-dns/route53/blob/8c20bfe316fe951d1e99a6c326ecc387bda4a1d1/route53.go#L24-L30

The New() function should not perform any provisioning: https://pkg.go.dev/github.com/caddyserver/caddy/v2?tab=doc#ModuleInfo

The Provisioner interface should be implemented instead.

(Labelling as a bug since it violates the doc.)

danlsgiga commented 4 years ago

I was not aware of the Provisioner interface. Thanks for pointing that out. Much more elegant way for dealing with initialization / provisioning.

mholt commented 4 years ago

Cool, thanks!