mirror of
https://github.com/go-micro/go-micro.git
synced 2025-01-23 17:53:05 +02:00
f23638c036
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
24 lines
627 B
Go
24 lines
627 B
Go
// Package autocert is the ACME provider from golang.org/x/crypto/acme/autocert
|
|
// This provider does not take any config.
|
|
package autocert
|
|
|
|
import (
|
|
"net"
|
|
|
|
"github.com/micro/go-micro/v2/api/server/acme"
|
|
"golang.org/x/crypto/acme/autocert"
|
|
)
|
|
|
|
// autoCertACME is the ACME provider from golang.org/x/crypto/acme/autocert
|
|
type autocertProvider struct{}
|
|
|
|
// NewListener implements acme.Provider
|
|
func (a *autocertProvider) NewListener(ACMEHosts ...string) (net.Listener, error) {
|
|
return autocert.NewListener(ACMEHosts...), nil
|
|
}
|
|
|
|
// New returns an autocert acme.Provider
|
|
func New() acme.Provider {
|
|
return &autocertProvider{}
|
|
}
|