- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for FindAllInIndex (0.1 sec)
-
pilot/pkg/serviceregistry/util/workloadinstances/selector.go
return func(wi *model.WorkloadInstance) bool { return wi.Namespace == namespace && selector.Match(wi.Endpoint.Labels) } } // FindAllInIndex returns a list of workload instances in the index // that match given predicate. // // The returned list is not ordered. func FindAllInIndex(index Index, predicate func(*model.WorkloadInstance) bool) []*model.WorkloadInstance { var instances []*model.WorkloadInstance
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Apr 07 04:26:56 UTC 2023 - 1.4K bytes - Viewed (0) -
pilot/pkg/serviceregistry/util/workloadinstances/index_test.go
}, } index := NewIndex() // test update index.Insert(wi1) index.Insert(wi2) index.Insert(wi3) index.Insert(wi4) // test search by service selector actual := FindAllInIndex(index, ByServiceSelector(selector.Namespace, labels.Instance{"app": "wle"})) want := []*model.WorkloadInstance{wi1, wi2} assert.Equal(t, len(want), len(actual)) got := map[string]*model.WorkloadInstance{}
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu May 23 21:07:03 UTC 2024 - 5K bytes - Viewed (0) -
pilot/pkg/serviceregistry/serviceentry/controller.go
if currentServiceEntry.WorkloadSelector != nil { selector := workloadinstances.ByServiceSelector(curr.Namespace, currentServiceEntry.WorkloadSelector.Labels) workloadInstances := workloadinstances.FindAllInIndex(s.workloadInstances, selector) for _, wi := range workloadInstances { if wi.DNSServiceEntryOnly && !isDNSTypeServiceEntry(currentServiceEntry) {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 29 15:31:09 UTC 2024 - 36.8K bytes - Viewed (0)