- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for IsListType (0.32 sec)
-
staging/src/k8s.io/apimachinery/pkg/api/meta/help.go
) var ( // isListCache maintains a cache of types that are checked for lists // which is used by IsListType. // TODO: remove and replace with an interface check isListCache = struct { lock sync.RWMutex byType map[reflect.Type]bool }{ byType: make(map[reflect.Type]bool, 1024), } ) // IsListType returns true if the provided Object has a slice called Items.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 29 16:25:43 UTC 2023 - 9.8K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/resource/visitor.go
return err } if info.Object == nil { return fn(info, nil) } if !meta.IsListType(info.Object) { return fn(info, nil) } items := []runtime.Object{} itemsToProcess := []runtime.Object{info.Object} for i := 0; i < len(itemsToProcess); i++ { currObj := itemsToProcess[i] if !meta.IsListType(currObj) { items = append(items, currObj) continue }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jul 03 10:17:56 UTC 2023 - 21.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/response.go
return } // ensure that for empty lists we don't return <nil> items. // This is safe to modify without deep-copying the object, as // List objects themselves are never cached. if meta.IsListType(result) && meta.LenList(result) == 0 { if err := meta.SetList(result, []runtime.Object{}); err != nil { scope.err(err, w, req) return } } var obj runtime.Object do := func() {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Oct 18 09:07:03 UTC 2023 - 16.5K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/printers/tableprinter.go
Cells: []interface{}{status.Status, status.Reason, status.Message}, }}, nil } func printObjectMeta(obj runtime.Object, options PrintOptions) ([]metav1.TableRow, error) { if meta.IsListType(obj) { rows := make([]metav1.TableRow, 0, 16) err := meta.EachListItem(obj, func(obj runtime.Object) error { nestedRows, err := printObjectMeta(obj, options) if err != nil { return err }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Oct 30 15:08:43 UTC 2022 - 16.7K bytes - Viewed (0)