traefik/configuration.go
Vincent Demeester cdade5f649 Rename NameProvider to Name
Because golint is gonna cry at some point otherwise.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-11-02 19:48:34 +01:00

39 lines
1.1 KiB
Go

package main
import (
"time"
"github.com/emilevauge/traefik/provider"
"github.com/emilevauge/traefik/types"
)
type GlobalConfiguration struct {
Port string
GraceTimeOut int64
AccessLogsFile string
TraefikLogsFile string
CertFile, KeyFile string
LogLevel string
ProvidersThrottleDuration time.Duration
Docker *provider.Docker
File *provider.File
Web *WebProvider
Marathon *provider.Marathon
Consul *provider.Consul
Etcd *provider.Etcd
Zookeeper *provider.Zookepper
Boltdb *provider.BoltDb
}
func NewGlobalConfiguration() *GlobalConfiguration {
globalConfiguration := new(GlobalConfiguration)
// default values
globalConfiguration.Port = ":80"
globalConfiguration.GraceTimeOut = 10
globalConfiguration.LogLevel = "ERROR"
globalConfiguration.ProvidersThrottleDuration = time.Duration(2 * time.Second)
return globalConfiguration
}
type configs map[string]*types.Configuration