1
0
Fork 0

chore: move the parser to a dedicated package.

This commit is contained in:
Ludovic Fernandez 2020-08-17 18:04:03 +02:00 committed by GitHub
parent eecc2f4dd7
commit 1502d20def
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
90 changed files with 191 additions and 14278 deletions

View file

@ -4,7 +4,7 @@ import (
"time"
"github.com/containous/traefik/v2/pkg/config/static"
"github.com/containous/traefik/v2/pkg/types"
ptypes "github.com/traefik/paerser/types"
)
// TraefikCmdConfiguration wraps the static configuration and extra parameters.
@ -23,7 +23,7 @@ func NewTraefikConfiguration() *TraefikCmdConfiguration {
},
EntryPoints: make(static.EntryPoints),
Providers: &static.Providers{
ProvidersThrottleDuration: types.Duration(2 * time.Second),
ProvidersThrottleDuration: ptypes.Duration(2 * time.Second),
},
ServersTransport: &static.ServersTransport{
MaxIdleConnsPerHost: 200,

View file

@ -7,8 +7,8 @@ import (
"os"
"time"
"github.com/containous/traefik/v2/pkg/cli"
"github.com/containous/traefik/v2/pkg/config/static"
"github.com/traefik/paerser/cli"
)
// NewCmd builds a new HealthCheck command.

View file

@ -15,7 +15,7 @@ import (
"github.com/containous/traefik/v2/cmd"
"github.com/containous/traefik/v2/cmd/healthcheck"
cmdVersion "github.com/containous/traefik/v2/cmd/version"
"github.com/containous/traefik/v2/pkg/cli"
tcli "github.com/containous/traefik/v2/pkg/cli"
"github.com/containous/traefik/v2/pkg/collector"
"github.com/containous/traefik/v2/pkg/config/dynamic"
"github.com/containous/traefik/v2/pkg/config/runtime"
@ -38,6 +38,7 @@ import (
"github.com/coreos/go-systemd/daemon"
assetfs "github.com/elazarl/go-bindata-assetfs"
"github.com/sirupsen/logrus"
"github.com/traefik/paerser/cli"
"github.com/vulcand/oxy/roundrobin"
)
@ -45,7 +46,7 @@ func main() {
// traefik config inits
tConfig := cmd.NewTraefikConfiguration()
loaders := []cli.ResourceLoader{&cli.FileLoader{}, &cli.FlagLoader{}, &cli.EnvLoader{}}
loaders := []cli.ResourceLoader{&tcli.FileLoader{}, &tcli.FlagLoader{}, &tcli.EnvLoader{}}
cmdTraefik := &cli.Command{
Name: "traefik",

View file

@ -7,8 +7,8 @@ import (
"runtime"
"text/template"
"github.com/containous/traefik/v2/pkg/cli"
"github.com/containous/traefik/v2/pkg/version"
"github.com/traefik/paerser/cli"
)
var versionTemplate = `Version: {{.Version}}