- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for insertBeforeFunc (0.19 sec)
-
pilot/pkg/networking/core/envoyfilter/util_test.go
t.Errorf("replaceFunc: want %+v but got %+v", c.applied, applied) } // insertBeforeFunc got, applied = insertBeforeFunc(slices.Clone(c.input), f) if !slices.Equal(c.insertBefore, got) { t.Errorf("insertBeforeFunc: want %+v but got %+v", c.insertBefore, got) } if c.applied != applied { t.Errorf("insertBeforeFunc: want %+v but got %+v", c.applied, applied) } // insertAfterFunc
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Mar 28 17:09:02 UTC 2024 - 3.2K bytes - Viewed (0) -
pilot/pkg/networking/core/envoyfilter/util.go
if ok, r := f(v); ok { s[k] = r applied = true break } } return s, applied } // insertBeforeFunc find and insert an element before the found element. // If the f function returns true, the returned value will be inserted before the found element. func insertBeforeFunc[E any](s []E, f func(e E) (bool, E)) ([]E, bool) { var toInsert E idx := -1 for k, v := range s { if ok, r := f(v); ok {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Mar 28 17:09:02 UTC 2024 - 2.1K bytes - Viewed (0) -
pilot/pkg/networking/core/envoyfilter/listener_patch.go
lis.ListenerFilters = append([]*listener.ListenerFilter{proto.Clone(lp.Value).(*listener.ListenerFilter)}, lis.ListenerFilters...) continue } lis.ListenerFilters, applied = insertBeforeFunc( lis.ListenerFilters, func(e *listener.ListenerFilter) (bool, *listener.ListenerFilter) { if listenerFilterMatch(e, lp) { return true, proto.Clone(lp.Value).(*listener.ListenerFilter) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri May 17 15:39:29 UTC 2024 - 26.7K bytes - Viewed (0) -
pilot/pkg/networking/core/envoyfilter/rc_patch.go
if !hasRouteMatch(rp) { virtualHost.Routes = append([]*route.Route{proto.Clone(rp.Value).(*route.Route)}, virtualHost.Routes...) continue } virtualHost.Routes, applied = insertBeforeFunc( virtualHost.Routes, func(e *route.Route) (bool, *route.Route) { if routeMatch(e, rp) { return true, proto.Clone(rp.Value).(*route.Route) } return false, nil }, )
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Mar 28 17:09:02 UTC 2024 - 13K bytes - Viewed (0)