- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for GetFromStructPath (0.32 sec)
-
operator/pkg/tpath/struct.go
"istio.io/istio/operator/pkg/util" ) // GetFromStructPath returns the value at path from the given node, or false if the path does not exist. func GetFromStructPath(node any, path string) (any, bool, error) { return getFromStructPath(node, util.PathFromString(path)) } // getFromStructPath is the internal implementation of GetFromStructPath which recurses through a tree of Go structs
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Jul 25 19:30:47 UTC 2022 - 4.4K bytes - Viewed (0) -
operator/pkg/tpath/struct_test.go
path: "c.d.e", wantFound: false, wantErr: "getFromStructPath path e, unsupported type string", }, } for _, tt := range tests { t.Run(tt.desc, func(t *testing.T) { rnode := make(map[string]any) if err := yaml.Unmarshal([]byte(tt.nodeYAML), &rnode); err != nil { t.Fatal(err) } GotOut, GotFound, gotErr := GetFromStructPath(rnode, tt.path) if GotFound != tt.wantFound {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Jul 25 19:30:47 UTC 2022 - 2.7K bytes - Viewed (0) -
operator/pkg/translate/translate_common.go
componentNodeI, found, err := tpath.GetFromStructPath(controlPlaneSpec, "Components."+string(componentName)+".Enabled") if err != nil { return false, fmt.Errorf("error in IsComponentEnabledInSpec GetFromStructPath componentEnabled for component=%s: %s", componentName, err) } if !found || componentNodeI == nil { return false, nil }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sun Apr 21 17:42:54 UTC 2024 - 4.5K bytes - Viewed (0) -
operator/pkg/name/name.go
defaultNamespace := iop.Namespace(controlPlaneSpec) componentNodeI, found, err := tpath.GetFromStructPath(controlPlaneSpec, "Components."+string(componentName)+".Namespace") if err != nil { return "", fmt.Errorf("error in Namespace GetFromStructPath componentNamespace for component=%s: %s", componentName, err) } if !found { return defaultNamespace, nil }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 14 19:23:44 UTC 2024 - 7.9K bytes - Viewed (0) -
operator/pkg/translate/translate_test.go
assert.NoError(t, err) val := obj.UnstructuredObject().Object["spec"].(map[string]interface{})["ports"].([]interface{})[0] apVal, found, _ := tpath.GetFromStructPath(val, "appProtocol") if !tt.expectExist { assert.Equal(t, found, false) } else { if apVal != nil { assert.Equal(t, apVal.(string), tt.expectValue) } else {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Feb 12 19:43:09 UTC 2024 - 5.1K bytes - Viewed (0) -
operator/pkg/apis/istio/v1alpha1/validation/validation.go
{"meshConfig.defaultConfig.tracing.stackdriver.maxNumberOfMessageEvents", "Istio supported tracers", 0}, } for _, d := range warningSettings { v, f, _ := tpath.GetFromStructPath(iop, d.old) if f { switch t := v.(type) { // need to do conversion for bool value defined in IstioOperator component spec. case *wrappers.BoolValue: v = t.Value } if v != d.def {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu May 16 20:02:28 UTC 2024 - 14.9K bytes - Viewed (0) -
operator/pkg/translate/translate.go
} renderedInPath := strings.Replace(inPath, "gressGateways.", "gressGateways."+fmt.Sprint(index)+".", 1) scope.Debugf("Checking for path %s in IstioOperatorSpec", renderedInPath) m, found, err := tpath.GetFromStructPath(iop, renderedInPath) if err != nil { return "", err } if !found { scope.Debugf("path %s not found in IstioOperatorSpec, skip mapping.", renderedInPath) continue }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Feb 12 19:43:09 UTC 2024 - 36.3K bytes - Viewed (0) -
operator/pkg/validate/validate.go
return Validate2(DefaultValidations, is) } func Validate2(validations map[string]ValidatorFunc, iop *v1alpha1.IstioOperatorSpec) (errs util.Errors) { for path, validator := range validations { v, f, _ := tpath.GetFromStructPath(iop, path) if f { errs = append(errs, validator(util.PathFromString(path), v)...) } } return } // Validate function below is used by third party for integrations and has to be public
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jan 12 16:04:15 UTC 2023 - 7.7K bytes - Viewed (0) -
istioctl/pkg/workload/workload.go
} var injectedCMValues map[string]any if err := json.Unmarshal([]byte(istioInjectionCM.Data[istioctlutil.ValuesConfigMapKey]), &injectedCMValues); err != nil { return "", err } v, f, err := tpath.GetFromStructPath(injectedCMValues, "global.multiCluster.clusterName") if err != nil { return "", err } vs, ok := v.(string) if !f || !ok {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Apr 17 20:06:41 UTC 2024 - 25.5K bytes - Viewed (0)