- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 21 for NoHeaders (0.23 sec)
-
pkg/printers/storage/storage.go
func (c TableConvertor) ConvertToTable(ctx context.Context, obj runtime.Object, tableOptions runtime.Object) (*metav1.Table, error) { noHeaders := false if tableOptions != nil { switch t := tableOptions.(type) { case *metav1.TableOptions: if t != nil { noHeaders = t.NoHeaders } default: return nil, fmt.Errorf("unrecognized type %T for table options, can't display tabular output", tableOptions) } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Nov 26 18:18:18 UTC 2019 - 1.5K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/printers/tableprinter_test.go
{Cells: []interface{}{"test1", "1/1", "podPhase", int64(5), "20h"}}, }, // Print with no headers. options: PrintOptions{NoHeaders: true}, expected: "test1 1/1 podPhase 5 20h\n", }, // Test a multi-row table row table with "NoHeaders" option, doesn't print columns. { columns: []metav1.TableColumnDefinition{ {Name: "Name", Type: "string"}, {Name: "Ready", Type: "string"},
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Oct 30 15:08:43 UTC 2022 - 24.4K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor/tableconvertor.go
func (c *convertor) ConvertToTable(ctx context.Context, obj runtime.Object, tableOptions runtime.Object) (*metav1.Table, error) { table := &metav1.Table{} opt, ok := tableOptions.(*metav1.TableOptions) noHeaders := ok && opt != nil && opt.NoHeaders if !noHeaders { table.ColumnDefinitions = c.headers } if m, err := meta.ListAccessor(obj); err == nil { table.ResourceVersion = m.GetResourceVersion() table.Continue = m.GetContinue()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 23 20:21:32 UTC 2022 - 5.2K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/printers/interface.go
// PrintObj receives a runtime object, formats it and prints it to a writer. PrintObj(runtime.Object, io.Writer) error } // PrintOptions struct defines a struct for various print options type PrintOptions struct { NoHeaders bool WithNamespace bool WithKind bool Wide bool ShowLabels bool Kind schema.GroupKind ColumnLabels []string SortBy string
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 30 00:36:07 UTC 2022 - 1.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/response.go
// we should print headers only on the first object - headers should be // omitted on subsequent events. if e.tableOptions != nil && !e.tableOptions.NoHeaders { e.tableOptions.NoHeaders = true // With options change, we should recompute the identifier. // Clearing this will trigger lazy recompute when needed. e.identifier = "" } return e.encoder.Encode(result, w) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Oct 18 09:07:03 UTC 2023 - 16.5K bytes - Viewed (0) -
pkg/printers/tablegenerator.go
"k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" ) // GenerateOptions encapsulates attributes for table generation. type GenerateOptions struct { NoHeaders bool Wide bool } // TableGenerator - an interface for generating metav1.Table provided a runtime.Object type TableGenerator interface {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jul 26 17:14:05 UTC 2022 - 5.9K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/printers/tableprinter.go
handler = statusHandlerEntry } else { handler = defaultHandlerEntry } includeHeaders := h.lastType != handler && !h.options.NoHeaders if h.lastType != nil && h.lastType != handler && !h.options.NoHeaders { fmt.Fprintln(output) } if err := printRowsForHandlerEntry(output, handler, eventType, obj, h.options, includeHeaders); 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) -
staging/src/k8s.io/apiserver/pkg/registry/rest/table.go
} else { if m, err := meta.CommonAccessor(object); err == nil { table.ResourceVersion = m.GetResourceVersion() } } if opt, ok := tableOptions.(*metav1.TableOptions); !ok || !opt.NoHeaders { table.ColumnDefinitions = []metav1.TableColumnDefinition{ {Name: "Name", Type: "string", Format: "name", Description: swaggerMetadataDescriptions["name"]},
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Feb 14 17:25:12 UTC 2022 - 3.4K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/apis/meta/fuzzer/fuzzer.go
return []interface{}{ func(r *metav1beta1.TableOptions, c fuzz.Continue) { c.FuzzNoCustom(r) // NoHeaders is not serialized to the wire but is allowed within the versioned // type because we don't use meta internal types in the client and API server. r.NoHeaders = false }, func(r *metav1beta1.TableRow, c fuzz.Continue) { c.Fuzz(&r.Object) c.Fuzz(&r.Conditions)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 03 15:12:26 UTC 2024 - 9.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/response_test.go
expectedObj: podMeta, expectedErr: nil, }, { desc: "cacheableObject as Table", object: &mockCacheableObject{obj: pod}, opts: &metav1beta1.TableOptions{NoHeaders: true, IncludeObject: metav1.IncludeNone}, target: &tableGVK, expectedObj: podTable, expectedErr: nil, }, } for _, test := range testCases { t.Run(test.desc, func(t *testing.T) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Oct 18 09:07:03 UTC 2023 - 6.4K bytes - Viewed (0)