mirror of
https://github.com/traefik/traefik
synced 2026-02-03 12:20:33 +00:00
Services middleware and Gateway API filters on HTTP backends
This commit is contained in:
+13
@@ -67,6 +67,19 @@ func (b *ServiceApplyConfiguration) WithNamespace(value string) *ServiceApplyCon
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMiddlewares adds the given value to the Middlewares field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Middlewares field.
|
||||
func (b *ServiceApplyConfiguration) WithMiddlewares(values ...*MiddlewareRefApplyConfiguration) *ServiceApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithMiddlewares")
|
||||
}
|
||||
b.LoadBalancerSpecApplyConfiguration.Middlewares = append(b.LoadBalancerSpecApplyConfiguration.Middlewares, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSticky sets the Sticky field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Sticky field is set to the value of the last call.
|
||||
|
||||
Reference in New Issue
Block a user