1
0
Fork 0

add acme package, refactor acme as resuable API

Signed-off-by: Emile Vauge <emile@vauge.com>
This commit is contained in:
Emile Vauge 2016-03-21 11:10:18 +01:00
parent 87e8393b07
commit d9ffc39075
No known key found for this signature in database
GPG key ID: D808B4C167352E59
8 changed files with 577 additions and 383 deletions

View file

@ -8,11 +8,11 @@ import (
"strings"
"time"
"github.com/containous/traefik/acme"
"github.com/containous/traefik/provider"
"github.com/containous/traefik/types"
"github.com/mitchellh/mapstructure"
"github.com/spf13/viper"
"sync"
)
// GlobalConfiguration holds global configuration (with providers, etc.).
@ -23,7 +23,7 @@ type GlobalConfiguration struct {
TraefikLogsFile string
LogLevel string
EntryPoints EntryPoints
ACME *ACME
ACME *acme.ACME
DefaultEntryPoints DefaultEntryPoints
ProvidersThrottleDuration time.Duration
MaxIdleConnsPerHost int
@ -142,23 +142,6 @@ type TLS struct {
Certificates Certificates
}
// ACME allows to connect to lets encrypt and retrieve certs
type ACME struct {
Email string
Domains []Domain
StorageFile string
OnDemand bool
CAServer string
EntryPoint string
storageLock sync.Mutex
}
// Domain holds a domain name with SANs
type Domain struct {
Main string
SANs []string
}
// Certificates defines traefik certificates type
type Certificates []Certificate