- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for ParseSubsetKey (0.64 sec)
-
istioctl/pkg/writer/envoy/configdump/cluster.go
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu May 11 05:38:17 UTC 2023 - 5.9K bytes - Viewed (0) -
pilot/pkg/model/service_test.go
t.Errorf("GetByPort(88) => want none but got %v, %t", port, exists) } } func BenchmarkParseSubsetKey(b *testing.B) { for n := 0; n < b.N; n++ { ParseSubsetKey("outbound|80|v1|example.com") ParseSubsetKey("outbound_.8080_.v1_.foo.example.org") } } func TestParseSubsetKey(t *testing.T) { tests := []struct { input string direction TrafficDirection subsetName string
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Mar 28 20:38:02 UTC 2024 - 13.9K bytes - Viewed (0) -
pilot/pkg/networking/grpcgen/rds.go
} return resp } func buildHTTPRoute(node *model.Proxy, push *model.PushContext, routeName string) *route.RouteConfiguration { // TODO use route-style naming instead of cluster naming _, _, hostname, port := model.ParseSubsetKey(routeName) if hostname == "" || port == 0 { log.Warnf("failed to parse %v", routeName) return nil }
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/grpcgen/cds.go
func newClusterFilter(names []string) map[string]sets.String { filter := map[string]sets.String{} for _, name := range names { dir, _, hn, p := model.ParseSubsetKey(name) defaultKey := model.BuildSubsetKey(dir, "", hn, p) sets.InsertOrNew(filter, defaultKey, name) } return filter }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Mar 28 17:09:02 UTC 2024 - 9.2K bytes - Viewed (0) -
pilot/pkg/model/service.go
return true } return false } // ParseSubsetKeyHostname is an optimized specialization of ParseSubsetKey that only returns the hostname. // This is created as this is used in some hot paths and is about 2x faster than ParseSubsetKey; for typical use ParseSubsetKey is sufficient (and zero-alloc). func ParseSubsetKeyHostname(s string) (hostname string) { idx := strings.LastIndex(s, "|") if idx == -1 {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 29 02:03:58 UTC 2024 - 46.3K bytes - Viewed (0) -
pilot/pkg/networking/core/envoyfilter/cluster_patch.go
cMatch := cp.Match.GetCluster() if cMatch == nil { return true } if cMatch.Name != "" { return cMatch.Name == cluster.Name } direction, subset, hostname, port := model.ParseSubsetKey(cluster.Name) hostMatches := []host.Name{hostname} // For inbound clusters, host parsed from subset key will be empty. Use the passed in service name. if direction == model.TrafficDirectionInbound && len(hosts) > 0 {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Mar 28 17:09:02 UTC 2024 - 6.8K bytes - Viewed (0) -
pilot/pkg/model/config_test.go
if got != c.want { t.Errorf("Failed: got %q want %q", got, c.want) } // test parse subset key. ParseSubsetKey is the inverse of BuildSubsetKey _, s, h, p := model.ParseSubsetKey(got) if s != c.subset || h != c.hostname || p != c.port { t.Errorf("Failed: got %s,%s,%d want %s,%s,%d", s, h, p, c.subset, c.hostname, c.port) } } }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Jun 20 12:54:10 UTC 2023 - 19K bytes - Viewed (0) -
pilot/pkg/networking/core/envoyfilter/rc_patch.go
if patchContext != networking.EnvoyFilter_GATEWAY { listenerPort := 0 if strings.HasPrefix(rc.Name, string(model.TrafficDirectionInbound)) { _, _, _, listenerPort = model.ParseSubsetKey(rc.Name) } else { listenerPort, _ = strconv.Atoi(rc.Name) } // FIXME: Ports on a route can be 0. the API only takes uint32 for ports
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Mar 28 17:09:02 UTC 2024 - 13K bytes - Viewed (0) -
pilot/pkg/xds/endpoints/endpoint_builder.go
dir model.TrafficDirection mtlsChecker *mtlsChecker } func NewEndpointBuilder(clusterName string, proxy *model.Proxy, push *model.PushContext) EndpointBuilder { dir, subsetName, hostname, port := model.ParseSubsetKey(clusterName) svc := push.ServiceForHostname(proxy, hostname) var dr *model.ConsolidatedDestRule if svc != nil { dr = proxy.SidecarScope.DestinationRule(model.TrafficDirectionOutbound, proxy, svc.Hostname) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sun Apr 28 02:18:19 UTC 2024 - 26.1K bytes - Viewed (0) -
pilot/pkg/networking/core/cluster_builder.go
res := make([]*discovery.Resource, 0, 1+len(destinationRule.GetSubsets())) cachedCluster := cb.cache.Get(&clusterKey) allFound := cachedCluster != nil res = append(res, cachedCluster) dir, _, host, port := model.ParseSubsetKey(clusterKey.clusterName) for _, ss := range destinationRule.GetSubsets() { clusterKey.clusterName = model.BuildSubsetKey(dir, ss.Name, host, port) cachedCluster := cb.cache.Get(&clusterKey) if cachedCluster == nil {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jun 13 01:56:28 UTC 2024 - 31.6K bytes - Viewed (0)