- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for ExtractFieldPathAsString (0.17 sec)
-
pkg/fieldpath/fieldpath.go
dst = append(dst, key...) dst = append(dst, '=') dst = strconv.AppendQuote(dst, m[key]) } return string(dst) } // ExtractFieldPathAsString extracts the field from the given object // and returns it as a string. The object must be a pointer to an // API type. func ExtractFieldPathAsString(obj interface{}, fieldPath string) (string, error) { accessor, err := meta.Accessor(obj) if err != nil { return "", err }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 02 06:26:55 UTC 2023 - 3.7K bytes - Viewed (0) -
pkg/fieldpath/fieldpath_test.go
obj: &v1.Pod{}, expectedMessageFragment: "fieldPath \"metadata.notexisting['something']\" does not support subscript", }, } for _, tc := range cases { actual, err := ExtractFieldPathAsString(tc.obj, tc.fieldPath) if err != nil { if tc.expectedMessageFragment != "" { if !strings.Contains(err.Error(), tc.expectedMessageFragment) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 02 06:26:55 UTC 2023 - 10.3K bytes - Viewed (0) -
pkg/volume/downwardapi/downwardapi.go
} else { fileProjection.Mode = *defaultMode } if fileInfo.FieldRef != nil { // TODO: unify with Kubelet.podFieldSelectorRuntimeValue if values, err := fieldpath.ExtractFieldPathAsString(pod, fileInfo.FieldRef.FieldPath); err != nil { klog.Errorf("Unable to extract field %s: %s", fileInfo.FieldRef.FieldPath, err.Error()) errlist = append(errlist, err) } else {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 14 06:17:25 UTC 2024 - 10.4K bytes - Viewed (0) -
pkg/kubelet/kubelet_pods.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jun 14 16:09:17 UTC 2024 - 101.2K bytes - Viewed (0)