Merge branch v2.1 into master
This commit is contained in:
commit
aa21351d0d
76 changed files with 392 additions and 395 deletions
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
"github.com/containous/traefik/v2/pkg/config/runtime"
|
||||
"github.com/containous/traefik/v2/pkg/log"
|
||||
"github.com/containous/traefik/v2/pkg/server/internal"
|
||||
"github.com/containous/traefik/v2/pkg/server/provider"
|
||||
"github.com/containous/traefik/v2/pkg/tcp"
|
||||
)
|
||||
|
||||
|
@ -27,8 +27,8 @@ func NewManager(conf *runtime.Configuration) *Manager {
|
|||
|
||||
// BuildTCP Creates a tcp.Handler for a service configuration.
|
||||
func (m *Manager) BuildTCP(rootCtx context.Context, serviceName string) (tcp.Handler, error) {
|
||||
serviceQualifiedName := internal.GetQualifiedName(rootCtx, serviceName)
|
||||
ctx := internal.AddProviderInContext(rootCtx, serviceQualifiedName)
|
||||
serviceQualifiedName := provider.GetQualifiedName(rootCtx, serviceName)
|
||||
ctx := provider.AddInContext(rootCtx, serviceQualifiedName)
|
||||
ctx = log.With(ctx, log.Str(log.ServiceName, serviceName))
|
||||
|
||||
conf, ok := m.configs[serviceQualifiedName]
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
|
||||
"github.com/containous/traefik/v2/pkg/config/dynamic"
|
||||
"github.com/containous/traefik/v2/pkg/config/runtime"
|
||||
"github.com/containous/traefik/v2/pkg/server/internal"
|
||||
"github.com/containous/traefik/v2/pkg/server/provider"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
@ -184,7 +184,7 @@ func TestManager_BuildTCP(t *testing.T) {
|
|||
|
||||
ctx := context.Background()
|
||||
if len(test.providerName) > 0 {
|
||||
ctx = internal.AddProviderInContext(ctx, "foobar@"+test.providerName)
|
||||
ctx = provider.AddInContext(ctx, "foobar@"+test.providerName)
|
||||
}
|
||||
|
||||
handler, err := manager.BuildTCP(ctx, test.serviceName)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue