Start abstracting away the ACME provider (#830)
* Start abstracting away the ACME provider * Move ACME to interface with sub-package implementations * Addressing comments * Library -> Provider * Missed a couple of Library -> Provider * One more Library -> Provider * remove constants
This commit is contained in:
@@ -11,7 +11,6 @@ import (
|
||||
"github.com/gorilla/handlers"
|
||||
"github.com/micro/go-micro/api/server"
|
||||
"github.com/micro/go-micro/util/log"
|
||||
"golang.org/x/crypto/acme/autocert"
|
||||
)
|
||||
|
||||
type httpServer struct {
|
||||
@@ -55,7 +54,7 @@ func (s *httpServer) Start() error {
|
||||
|
||||
if s.opts.EnableACME {
|
||||
// should we check the address to make sure its using :443?
|
||||
l = autocert.NewListener(s.opts.ACMEHosts...)
|
||||
l, err = s.opts.ACMEProvider.NewListener(s.opts.ACMEHosts...)
|
||||
} else if s.opts.EnableTLS && s.opts.TLSConfig != nil {
|
||||
l, err = tls.Listen("tcp", s.address, s.opts.TLSConfig)
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user