Spelling
This commit is contained in:
parent
ce851a5929
commit
819de02101
18 changed files with 51 additions and 51 deletions
|
@ -144,7 +144,7 @@ func TestPopulateUsedBy(t *testing.T) {
|
|||
},
|
||||
},
|
||||
{
|
||||
desc: "2 different Services each used by a disctinct router.",
|
||||
desc: "2 different Services each used by a distinct router.",
|
||||
conf: &runtime.Configuration{
|
||||
Services: map[string]*runtime.ServiceInfo{
|
||||
"foo-service@myprovider": {
|
||||
|
@ -384,7 +384,7 @@ func TestPopulateUsedBy(t *testing.T) {
|
|||
},
|
||||
},
|
||||
{
|
||||
desc: "2 middlewares from 2 disctinct providers both used by 2 Routers",
|
||||
desc: "2 middlewares from 2 distinct providers both used by 2 Routers",
|
||||
conf: &runtime.Configuration{
|
||||
Services: map[string]*runtime.ServiceInfo{
|
||||
"foo-service@myprovider": {
|
||||
|
@ -593,7 +593,7 @@ func TestPopulateUsedBy(t *testing.T) {
|
|||
},
|
||||
},
|
||||
{
|
||||
desc: "TCP, 2 different Services each used by a disctinct router.",
|
||||
desc: "TCP, 2 different Services each used by a distinct router.",
|
||||
conf: &runtime.Configuration{
|
||||
TCPServices: map[string]*runtime.TCPServiceInfo{
|
||||
"foo-service@myprovider": {
|
||||
|
|
|
@ -44,7 +44,7 @@ type BalancerHandler interface {
|
|||
}
|
||||
|
||||
// BalancerStatusHandler is an http Handler that does load-balancing,
|
||||
// andupdates its parents of its status.
|
||||
// and updates its parents of its status.
|
||||
type BalancerStatusHandler interface {
|
||||
BalancerHandler
|
||||
StatusUpdater
|
||||
|
|
|
@ -131,7 +131,7 @@ func initStandardRegistry(config *types.Prometheus) Registry {
|
|||
Name: configLastReloadFailureName,
|
||||
Help: "Last config reload failure",
|
||||
}, []string{})
|
||||
tlsCertsNotAfterTimesptamp := newGaugeFrom(promState.collectors, stdprometheus.GaugeOpts{
|
||||
tlsCertsNotAfterTimestamp := newGaugeFrom(promState.collectors, stdprometheus.GaugeOpts{
|
||||
Name: tlsCertsNotAfterTimestamp,
|
||||
Help: "Certificate expiration timestamp",
|
||||
}, []string{"cn", "serial", "sans"})
|
||||
|
@ -141,7 +141,7 @@ func initStandardRegistry(config *types.Prometheus) Registry {
|
|||
configReloadsFailures.cv.Describe,
|
||||
lastConfigReloadSuccess.gv.Describe,
|
||||
lastConfigReloadFailure.gv.Describe,
|
||||
tlsCertsNotAfterTimesptamp.gv.Describe,
|
||||
tlsCertsNotAfterTimestamp.gv.Describe,
|
||||
}
|
||||
|
||||
reg := &standardRegistry{
|
||||
|
@ -152,7 +152,7 @@ func initStandardRegistry(config *types.Prometheus) Registry {
|
|||
configReloadsFailureCounter: configReloadsFailures,
|
||||
lastConfigReloadSuccessGauge: lastConfigReloadSuccess,
|
||||
lastConfigReloadFailureGauge: lastConfigReloadFailure,
|
||||
tlsCertsNotAfterTimestampGauge: tlsCertsNotAfterTimesptamp,
|
||||
tlsCertsNotAfterTimestampGauge: tlsCertsNotAfterTimestamp,
|
||||
}
|
||||
|
||||
if config.AddEntryPointsLabels {
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
|
||||
func TestRecoverHandler(t *testing.T) {
|
||||
fn := func(w http.ResponseWriter, r *http.Request) {
|
||||
panic("I love panicing!")
|
||||
panic("I love panicking!")
|
||||
}
|
||||
recovery, err := New(context.Background(), http.HandlerFunc(fn))
|
||||
require.NoError(t, err)
|
||||
|
|
|
@ -104,11 +104,11 @@ func TestRetry(t *testing.T) {
|
|||
t.Run(test.desc, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
retryAttemps := 0
|
||||
retryAttempts := 0
|
||||
next := http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
|
||||
retryAttemps++
|
||||
retryAttempts++
|
||||
|
||||
if retryAttemps > test.amountFaultyEndpoints {
|
||||
if retryAttempts > test.amountFaultyEndpoints {
|
||||
// calls WroteHeaders on httptrace.
|
||||
_ = r.Write(io.Discard)
|
||||
|
||||
|
@ -275,11 +275,11 @@ func TestRetryWebsocket(t *testing.T) {
|
|||
t.Run(test.desc, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
retryAttemps := 0
|
||||
retryAttempts := 0
|
||||
next := http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
|
||||
retryAttemps++
|
||||
retryAttempts++
|
||||
|
||||
if retryAttemps > test.amountFaultyEndpoints {
|
||||
if retryAttempts > test.amountFaultyEndpoints {
|
||||
upgrader := websocket.Upgrader{}
|
||||
_, err := upgrader.Upgrade(rw, r, nil)
|
||||
if err != nil {
|
||||
|
|
|
@ -10,12 +10,12 @@ import (
|
|||
"github.com/traefik/traefik/v2/pkg/tracing"
|
||||
)
|
||||
|
||||
// Tracable embeds tracing information.
|
||||
type Tracable interface {
|
||||
// Traceable embeds tracing information.
|
||||
type Traceable interface {
|
||||
GetTracingInformation() (name string, spanKind ext.SpanKindEnum)
|
||||
}
|
||||
|
||||
// Wrap adds tracability to an alice.Constructor.
|
||||
// Wrap adds traceability to an alice.Constructor.
|
||||
func Wrap(ctx context.Context, constructor alice.Constructor) alice.Constructor {
|
||||
return func(next http.Handler) (http.Handler, error) {
|
||||
if constructor == nil {
|
||||
|
@ -26,8 +26,8 @@ func Wrap(ctx context.Context, constructor alice.Constructor) alice.Constructor
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if tracableHandler, ok := handler.(Tracable); ok {
|
||||
name, spanKind := tracableHandler.GetTracingInformation()
|
||||
if traceableHandler, ok := handler.(Traceable); ok {
|
||||
name, spanKind := traceableHandler.GetTracingInformation()
|
||||
log.FromContext(ctx).WithField(log.MiddlewareName, name).Debug("Adding tracing to middleware")
|
||||
return NewWrapper(handler, name, spanKind), nil
|
||||
}
|
||||
|
|
|
@ -454,7 +454,7 @@ func (p *Provider) lookupTaskDefinitions(ctx context.Context, client *awsClient,
|
|||
// chunkIDs ECS expects no more than 100 parameters be passed to a API call;
|
||||
// thus, pack each string into an array capped at 100 elements.
|
||||
func (p *Provider) chunkIDs(ids []*string) [][]*string {
|
||||
var chuncked [][]*string
|
||||
var chunked [][]*string
|
||||
for i := 0; i < len(ids); i += 100 {
|
||||
var sliceEnd int
|
||||
if i+100 < len(ids) {
|
||||
|
@ -462,7 +462,7 @@ func (p *Provider) chunkIDs(ids []*string) [][]*string {
|
|||
} else {
|
||||
sliceEnd = len(ids)
|
||||
}
|
||||
chuncked = append(chuncked, ids[i:sliceEnd])
|
||||
chunked = append(chunked, ids[i:sliceEnd])
|
||||
}
|
||||
return chuncked
|
||||
return chunked
|
||||
}
|
||||
|
|
|
@ -27,5 +27,5 @@ spec:
|
|||
weight: 4
|
||||
# with unknown namespace
|
||||
- name: whoamitcp
|
||||
namespace: unknwonns
|
||||
namespace: unknowns
|
||||
port: 8080
|
||||
|
|
|
@ -26,5 +26,5 @@ spec:
|
|||
weight: 4
|
||||
# with unknown namespace
|
||||
- name: whoamiudp
|
||||
namespace: unknwonns
|
||||
namespace: unknowns
|
||||
port: 8080
|
||||
|
|
|
@ -4,7 +4,7 @@ apiVersion: gateway.networking.k8s.io/v1alpha2
|
|||
metadata:
|
||||
name: my-gateway-class
|
||||
spec:
|
||||
controllerName: unkown.io/gateway-controller
|
||||
controllerName: unknown.io/gateway-controller
|
||||
|
||||
---
|
||||
kind: Gateway
|
||||
|
|
|
@ -4,7 +4,7 @@ apiVersion: gateway.networking.k8s.io/v1alpha2
|
|||
metadata:
|
||||
name: my-gateway-class
|
||||
spec:
|
||||
controllerName: unkown.io/gateway-controller
|
||||
controllerName: unknown.io/gateway-controller
|
||||
|
||||
---
|
||||
kind: Gateway
|
||||
|
|
|
@ -15,7 +15,7 @@ apiVersion: gateway.networking.k8s.io/v1alpha2
|
|||
metadata:
|
||||
name: my-gateway-class
|
||||
spec:
|
||||
controllerName: unkown.io/gateway-controller
|
||||
controllerName: unknown.io/gateway-controller
|
||||
|
||||
---
|
||||
kind: Gateway
|
||||
|
|
|
@ -86,7 +86,7 @@ func (b *Balancer) Push(x interface{}) {
|
|||
b.handlers = append(b.handlers, h)
|
||||
}
|
||||
|
||||
// Pop implements heap.Interface for poping an item from the heap.
|
||||
// Pop implements heap.Interface for popping an item from the heap.
|
||||
// It panics if b.Len() < 1.
|
||||
func (b *Balancer) Pop() interface{} {
|
||||
h := b.handlers[len(b.handlers)-1]
|
||||
|
|
|
@ -144,7 +144,7 @@ func TestAppendRespectsImmutability(t *testing.T) {
|
|||
newChain := chain.Append(tagMiddleware(""))
|
||||
|
||||
if &chain.constructors[0] == &newChain.constructors[0] {
|
||||
t.Error("Apppend does not respect immutability")
|
||||
t.Error("Append does not respect immutability")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue