Skip to content

Commit

Permalink
Move code to pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez authored and traefiker committed Mar 15, 2019
1 parent bd4c822 commit f1b085f
Show file tree
Hide file tree
Showing 465 changed files with 656 additions and 680 deletions.
16 changes: 8 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/dist
/autogen/genstatic/gen.go
.idea/
.intellij/
*.iml
/traefik
/traefik.toml
/static/
/webui/.tmp/
.vscode/
.DS_Store
/dist
/webui/.tmp/
/site/
/docs/site/
/static/
/autogen/
/traefik
/traefik.toml
*.log
*.exe
.DS_Store
/examples/acme/acme.json
cover.out
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ builds:
env:
- CGO_ENABLED=0
ldflags:
- -s -w -X github.com/containous/traefik/version.Version={{.Version}} -X github.com/containous/traefik/version.Codename={{.Env.CODENAME}} -X github.com/containous/traefik/version.BuildDate={{.Date}}
- -s -w -X github.com/containous/traefik/pkg/version.Version={{.Version}} -X github.com/containous/traefik/pkg/version.Codename={{.Env.CODENAME}} -X github.com/containous/traefik/pkg/version.BuildDate={{.Date}}

goos:
- linux
Expand Down
24 changes: 12 additions & 12 deletions cmd/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"time"

"github.com/containous/flaeg/parse"
"github.com/containous/traefik/config/static"
"github.com/containous/traefik/old/configuration"
"github.com/containous/traefik/old/middlewares/accesslog"
"github.com/containous/traefik/old/provider/boltdb"
Expand All @@ -17,17 +16,18 @@ import (
"github.com/containous/traefik/old/provider/mesos"
"github.com/containous/traefik/old/provider/rancher"
"github.com/containous/traefik/old/provider/zk"
"github.com/containous/traefik/ping"
"github.com/containous/traefik/provider/docker"
"github.com/containous/traefik/provider/file"
"github.com/containous/traefik/provider/kubernetes/ingress"
"github.com/containous/traefik/provider/marathon"
"github.com/containous/traefik/provider/rest"
"github.com/containous/traefik/tracing/datadog"
"github.com/containous/traefik/tracing/instana"
"github.com/containous/traefik/tracing/jaeger"
"github.com/containous/traefik/tracing/zipkin"
"github.com/containous/traefik/types"
"github.com/containous/traefik/pkg/config/static"
"github.com/containous/traefik/pkg/ping"
"github.com/containous/traefik/pkg/provider/docker"
"github.com/containous/traefik/pkg/provider/file"
"github.com/containous/traefik/pkg/provider/kubernetes/ingress"
"github.com/containous/traefik/pkg/provider/marathon"
"github.com/containous/traefik/pkg/provider/rest"
"github.com/containous/traefik/pkg/tracing/datadog"
"github.com/containous/traefik/pkg/tracing/instana"
"github.com/containous/traefik/pkg/tracing/jaeger"
"github.com/containous/traefik/pkg/tracing/zipkin"
"github.com/containous/traefik/pkg/types"
jaegercli "github.com/uber/jaeger-client-go"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/convert/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"strings"

"github.com/BurntSushi/toml"
"github.com/containous/traefik/config"
"github.com/containous/traefik/old/log"
"github.com/containous/traefik/old/types"
"github.com/containous/traefik/pkg/config"
"github.com/sirupsen/logrus"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/healthcheck/healthcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/containous/flaeg"
"github.com/containous/traefik/cmd"
"github.com/containous/traefik/config/static"
"github.com/containous/traefik/pkg/config/static"
)

// NewCmd builds a new HealthCheck command
Expand Down
26 changes: 13 additions & 13 deletions cmd/traefik/traefik.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ import (
"github.com/containous/traefik/cmd/healthcheck"
"github.com/containous/traefik/cmd/storeconfig"
cmdVersion "github.com/containous/traefik/cmd/version"
"github.com/containous/traefik/collector"
"github.com/containous/traefik/config"
"github.com/containous/traefik/config/static"
"github.com/containous/traefik/job"
"github.com/containous/traefik/log"
"github.com/containous/traefik/old/provider/ecs"
oldtypes "github.com/containous/traefik/old/types"
"github.com/containous/traefik/provider/aggregator"
"github.com/containous/traefik/provider/kubernetes/k8s"
"github.com/containous/traefik/safe"
"github.com/containous/traefik/server"
"github.com/containous/traefik/server/router"
traefiktls "github.com/containous/traefik/tls"
"github.com/containous/traefik/types"
"github.com/containous/traefik/version"
"github.com/containous/traefik/pkg/collector"
"github.com/containous/traefik/pkg/config"
"github.com/containous/traefik/pkg/config/static"
"github.com/containous/traefik/pkg/job"
"github.com/containous/traefik/pkg/log"
"github.com/containous/traefik/pkg/provider/aggregator"
"github.com/containous/traefik/pkg/provider/kubernetes/k8s"
"github.com/containous/traefik/pkg/safe"
"github.com/containous/traefik/pkg/server"
"github.com/containous/traefik/pkg/server/router"
traefiktls "github.com/containous/traefik/pkg/tls"
"github.com/containous/traefik/pkg/types"
"github.com/containous/traefik/pkg/version"
"github.com/coreos/go-systemd/daemon"
assetfs "github.com/elazarl/go-bindata-assetfs"
"github.com/ogier/pflag"
Expand Down
2 changes: 1 addition & 1 deletion cmd/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"text/template"

"github.com/containous/flaeg"
"github.com/containous/traefik/version"
"github.com/containous/traefik/pkg/version"
)

var versionTemplate = `Version: {{.Version}}
Expand Down
4 changes: 2 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ docs-verify: docs-build
docker build -t $(TRAEFIK_DOCS_CHECK_IMAGE) -f check.Dockerfile ./; \
docker run --rm -v $(CURDIR):/app $(TRAEFIK_DOCS_CHECK_IMAGE) /verify.sh; \
else \
@echo "DOCS_VERIFY_SKIP is true: no verification done."; \
echo "DOCS_VERIFY_SKIP is true: no verification done."; \
fi

docs-lint:
@if [ "$(DOCS_LINT_SKIP)" != "true" ]; then \
docker build -t $(TRAEFIK_DOCS_CHECK_IMAGE) -f check.Dockerfile ./ && \
docker run --rm -v $(CURDIR):/app $(TRAEFIK_DOCS_CHECK_IMAGE) /lint.sh; \
else \
@echo "DOCS_LINT_SKIP is true: no linting done."; \
echo "DOCS_LINT_SKIP is true: no linting done."; \
fi

docs-clean:
Expand Down
2 changes: 1 addition & 1 deletion docs/content/contributing/data-collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,6 @@ Once a day (the first call begins 10 minutes after the start of Traefik), we col

## The Code for Data Collection

If you want to dig into more details, here is the source code of the collecting system: [collector.go](https://github.com/containous/traefik/blob/master/collector/collector.go)
If you want to dig into more details, here is the source code of the collecting system: [collector.go](https://github.com/containous/traefik/blob/master/pkg/collector/collector.go)

By default we anonymize all configuration fields, except fields tagged with `export=true`.
1 change: 1 addition & 0 deletions generate.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:generate mkdir -p autogen
//go:generate rm -vf autogen/genstatic/gen.go
//go:generate mkdir -p static
//go:generate go-bindata -pkg genstatic -nocompress -o autogen/genstatic/gen.go ./static/...
Expand Down
4 changes: 2 additions & 2 deletions integration/access_log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"time"

"github.com/containous/traefik/integration/try"
"github.com/containous/traefik/log"
"github.com/containous/traefik/middlewares/accesslog"
"github.com/containous/traefik/pkg/log"
"github.com/containous/traefik/pkg/middlewares/accesslog"
"github.com/go-check/check"
checker "github.com/vdemeester/shakers"
)
Expand Down
6 changes: 3 additions & 3 deletions integration/acme_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"time"

"github.com/containous/traefik/integration/try"
"github.com/containous/traefik/provider/acme"
"github.com/containous/traefik/testhelpers"
"github.com/containous/traefik/types"
"github.com/containous/traefik/pkg/provider/acme"
"github.com/containous/traefik/pkg/testhelpers"
"github.com/containous/traefik/pkg/types"
"github.com/go-check/check"
"github.com/miekg/dns"
checker "github.com/vdemeester/shakers"
Expand Down
4 changes: 2 additions & 2 deletions integration/docker_compose_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"os"
"time"

"github.com/containous/traefik/api"
"github.com/containous/traefik/integration/try"
"github.com/containous/traefik/testhelpers"
"github.com/containous/traefik/pkg/api"
"github.com/containous/traefik/pkg/testhelpers"
"github.com/go-check/check"
checker "github.com/vdemeester/shakers"
)
Expand Down
2 changes: 1 addition & 1 deletion integration/fake_dns_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net"
"os"

"github.com/containous/traefik/log"
"github.com/containous/traefik/pkg/log"
"github.com/miekg/dns"
)

Expand Down
2 changes: 1 addition & 1 deletion integration/grpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"github.com/containous/traefik/integration/helloworld"
"github.com/containous/traefik/integration/try"
"github.com/containous/traefik/log"
"github.com/containous/traefik/pkg/log"
"github.com/go-check/check"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
Expand Down
2 changes: 1 addition & 1 deletion integration/https_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/BurntSushi/toml"
"github.com/containous/traefik/integration/try"
"github.com/containous/traefik/old/types"
traefiktls "github.com/containous/traefik/tls"
traefiktls "github.com/containous/traefik/pkg/tls"
"github.com/go-check/check"
checker "github.com/vdemeester/shakers"
)
Expand Down
2 changes: 1 addition & 1 deletion integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"testing"
"text/template"

"github.com/containous/traefik/log"
"github.com/containous/traefik/pkg/log"
"github.com/go-check/check"
compose "github.com/libkermit/compose/check"
checker "github.com/vdemeester/shakers"
Expand Down
2 changes: 1 addition & 1 deletion integration/rest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"net/http"
"time"

"github.com/containous/traefik/config"
"github.com/containous/traefik/integration/try"
"github.com/containous/traefik/pkg/config"
"github.com/go-check/check"
checker "github.com/vdemeester/shakers"
)
Expand Down
2 changes: 1 addition & 1 deletion integration/simple_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"syscall"
"time"

"github.com/containous/traefik/config"
"github.com/containous/traefik/integration/try"
"github.com/containous/traefik/pkg/config"
"github.com/go-check/check"
checker "github.com/vdemeester/shakers"
)
Expand Down
2 changes: 1 addition & 1 deletion integration/try/try.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"time"

"github.com/containous/traefik/log"
"github.com/containous/traefik/pkg/log"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions old/acme/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import (
"sync"
"time"

"github.com/containous/traefik/log"
acmeprovider "github.com/containous/traefik/provider/acme"
"github.com/containous/traefik/types"
"github.com/containous/traefik/pkg/log"
acmeprovider "github.com/containous/traefik/pkg/provider/acme"
"github.com/containous/traefik/pkg/types"
"github.com/go-acme/lego/certcrypto"
"github.com/go-acme/lego/registration"
)
Expand Down
10 changes: 5 additions & 5 deletions old/acme/acme.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ import (
"github.com/cenkalti/backoff"
"github.com/containous/mux"
"github.com/containous/staert"
"github.com/containous/traefik/log"
"github.com/containous/traefik/old/cluster"
acmeprovider "github.com/containous/traefik/provider/acme"
"github.com/containous/traefik/safe"
"github.com/containous/traefik/types"
"github.com/containous/traefik/version"
"github.com/containous/traefik/pkg/log"
acmeprovider "github.com/containous/traefik/pkg/provider/acme"
"github.com/containous/traefik/pkg/safe"
"github.com/containous/traefik/pkg/types"
"github.com/containous/traefik/pkg/version"
"github.com/eapache/channels"
"github.com/go-acme/lego/certificate"
"github.com/go-acme/lego/challenge"
Expand Down
6 changes: 3 additions & 3 deletions old/acme/acme_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"testing"
"time"

acmeprovider "github.com/containous/traefik/provider/acme"
"github.com/containous/traefik/tls/generate"
"github.com/containous/traefik/types"
acmeprovider "github.com/containous/traefik/pkg/provider/acme"
"github.com/containous/traefik/pkg/tls/generate"
"github.com/containous/traefik/pkg/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
4 changes: 2 additions & 2 deletions old/acme/challenge_http_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"time"

"github.com/cenkalti/backoff"
"github.com/containous/traefik/log"
"github.com/containous/traefik/old/cluster"
"github.com/containous/traefik/safe"
"github.com/containous/traefik/pkg/log"
"github.com/containous/traefik/pkg/safe"
"github.com/go-acme/lego/challenge"
)

Expand Down
4 changes: 2 additions & 2 deletions old/acme/challenge_tls_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"time"

"github.com/cenkalti/backoff"
"github.com/containous/traefik/log"
"github.com/containous/traefik/old/cluster"
"github.com/containous/traefik/safe"
"github.com/containous/traefik/pkg/log"
"github.com/containous/traefik/pkg/safe"
"github.com/go-acme/lego/challenge"
"github.com/go-acme/lego/challenge/tlsalpn01"
)
Expand Down
4 changes: 2 additions & 2 deletions old/acme/localStore.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"io/ioutil"
"os"

"github.com/containous/traefik/log"
"github.com/containous/traefik/provider/acme"
"github.com/containous/traefik/pkg/log"
"github.com/containous/traefik/pkg/provider/acme"
)

// LocalStore is a store using a file as storage
Expand Down
4 changes: 2 additions & 2 deletions old/api/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/containous/traefik/old/log"
"github.com/containous/traefik/old/middlewares"
"github.com/containous/traefik/old/types"
"github.com/containous/traefik/safe"
"github.com/containous/traefik/version"
"github.com/containous/traefik/pkg/safe"
"github.com/containous/traefik/pkg/version"
assetfs "github.com/elazarl/go-bindata-assetfs"
thoas_stats "github.com/thoas/stats"
"github.com/unrolled/render"
Expand Down
6 changes: 3 additions & 3 deletions old/cluster/datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"github.com/abronan/valkeyrie/store"
"github.com/cenkalti/backoff"
"github.com/containous/staert"
"github.com/containous/traefik/job"
"github.com/containous/traefik/log"
"github.com/containous/traefik/safe"
"github.com/containous/traefik/pkg/job"
"github.com/containous/traefik/pkg/log"
"github.com/containous/traefik/pkg/safe"
uuid "github.com/satori/go.uuid"
)

Expand Down
4 changes: 2 additions & 2 deletions old/cluster/leadership.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (

"github.com/cenkalti/backoff"
"github.com/containous/mux"
"github.com/containous/traefik/log"
"github.com/containous/traefik/old/types"
"github.com/containous/traefik/safe"
"github.com/containous/traefik/pkg/log"
"github.com/containous/traefik/pkg/safe"
"github.com/docker/leadership"
"github.com/unrolled/render"
)
Expand Down
10 changes: 5 additions & 5 deletions old/configuration/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ import (
"github.com/containous/traefik/old/provider/zk"
"github.com/containous/traefik/old/tls"
"github.com/containous/traefik/old/types"
acmeprovider "github.com/containous/traefik/provider/acme"
"github.com/containous/traefik/provider/docker"
"github.com/containous/traefik/provider/file"
"github.com/containous/traefik/provider/kubernetes/ingress"
newtypes "github.com/containous/traefik/types"
acmeprovider "github.com/containous/traefik/pkg/provider/acme"
"github.com/containous/traefik/pkg/provider/docker"
"github.com/containous/traefik/pkg/provider/file"
"github.com/containous/traefik/pkg/provider/kubernetes/ingress"
newtypes "github.com/containous/traefik/pkg/types"
"github.com/go-acme/lego/challenge/dns01"
"github.com/pkg/errors"
)
Expand Down
Loading

0 comments on commit f1b085f

Please sign in to comment.