summaryrefslogtreecommitdiff
path: root/modules/caddytls/tls.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2020-03-26 14:02:29 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2020-03-26 14:02:29 -0600
commitea3688e1c057a042bbae97175f42eb4ec3029667 (patch)
treefda2b46b322872d7d24bba1bcc3d6983a597bb8d /modules/caddytls/tls.go
parentc87f82f0ce58ec714b3e13fbe69c322a0d612c67 (diff)
caddytls: Remove ManageSync
This seems unnecessary for now and we can always add it in later if people have a good reason to need it.
Diffstat (limited to 'modules/caddytls/tls.go')
-rw-r--r--modules/caddytls/tls.go13
1 files changed, 4 insertions, 9 deletions
diff --git a/modules/caddytls/tls.go b/modules/caddytls/tls.go
index b2c6324..54f0e23 100644
--- a/modules/caddytls/tls.go
+++ b/modules/caddytls/tls.go
@@ -247,8 +247,8 @@ func (t *TLS) Cleanup() error {
func (t *TLS) Manage(names []string) error {
// for a large number of names, we can be more memory-efficient
// by making only one certmagic.Config for all the names that
- // use that config, rather than calling ManageSync/ManageAsync
- // once for every name; so first, bin names by AutomationPolicy
+ // use that config, rather than calling ManageAsync once for
+ // every name; so first, bin names by AutomationPolicy
policyToNames := make(map[*AutomationPolicy][]string)
for _, name := range names {
ap := t.getAutomationPolicyForName(name)
@@ -257,14 +257,9 @@ func (t *TLS) Manage(names []string) error {
// now that names are grouped by policy, we can simply make one
// certmagic.Config for each (potentially large) group of names
- // and call ManageSync/ManageAsync just once for the whole batch
+ // and call ManageAsync just once for the whole batch
for ap, names := range policyToNames {
- var err error
- if ap.ManageSync {
- err = ap.magic.ManageSync(names)
- } else {
- err = ap.magic.ManageAsync(t.ctx.Context, names)
- }
+ err := ap.magic.ManageAsync(t.ctx.Context, names)
if err != nil {
return fmt.Errorf("automate: manage %v: %v", names, err)
}