Implementation of certmagic storage using micro's store and sync packages

This commit is contained in:
Jake Sanders
2019-10-15 19:32:20 +01:00
parent b1d5dc20fa
commit a6e95d389f
6 changed files with 248 additions and 79 deletions

View File

@@ -2,6 +2,7 @@
package certmagic
import (
"log"
"net"
"github.com/mholt/certmagic"
@@ -36,6 +37,12 @@ func New(options ...acme.Option) acme.Provider {
op(o)
}
}
if o.Cache != nil {
if _, ok := o.Cache.(certmagic.Storage); !ok {
log.Fatal("ACME: cache provided doesn't implement certmagic's Storage interface")
}
}
return &certmagicProvider{
opts: o,
}