- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for PrintObj (0.61 sec)
-
staging/src/k8s.io/cli-runtime/pkg/printers/interface.go
// PrintObj implements ResourcePrinter func (fn ResourcePrinterFunc) PrintObj(obj runtime.Object, w io.Writer) error { return fn(obj, w) } // ResourcePrinter is an interface that knows how to print runtime objects. type ResourcePrinter interface { // PrintObj receives a runtime object, formats it and prints it to a writer. PrintObj(runtime.Object, io.Writer) error }
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/cli-runtime/pkg/printers/json.go
"k8s.io/apimachinery/pkg/runtime" ) // JSONPrinter is an implementation of ResourcePrinter which outputs an object as JSON. type JSONPrinter struct{} // PrintObj is an implementation of ResourcePrinter.PrintObj which simply writes the object to the Writer. func (p *JSONPrinter) PrintObj(obj runtime.Object, w io.Writer) error { // we use reflect.Indirect here in order to obtain the actual value from a pointer.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Sep 10 11:23:25 UTC 2021 - 2.3K bytes - Viewed (0) -
cmd/kubeadm/app/util/output/output.go
if err != nil { return nil, err } return &ResourcePrinterWrapper{Printer: resourcePrinter}, nil } // PrintObj is an implementation of ResourcePrinter.PrintObj that calls underlying printer API func (rpw *ResourcePrinterWrapper) PrintObj(obj runtime.Object, writer io.Writer) error { return rpw.Printer.PrintObj(obj, writer) } // Fprintf is an empty method to satisfy Printer interface
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Apr 19 08:22:45 UTC 2024 - 8K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/printers/bench_test.go
b.ReportAllocs() b.RunParallel(func(pb *testing.PB) { for pb.Next() { buf := &bytes.Buffer{} if err := printerFunc().PrintObj(data, buf); err != nil { b.Errorf("PrintObj failed: %v", err) } } })
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 30 00:36:07 UTC 2022 - 4.2K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/printers/json_test.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:46:12 UTC 2023 - 4K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/printers/yaml.go
// The input object is assumed to be in the internal version of an API and is converted // to the given version first. // If PrintObj() is called multiple times, objects are separated with a '---' separator. type YAMLPrinter struct { printCount int64 } // PrintObj prints the data as YAML. func (p *YAMLPrinter) PrintObj(obj runtime.Object, w io.Writer) error { // we use reflect.Indirect here in order to obtain the actual value from a pointer.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jun 02 14:15:25 UTC 2022 - 2.5K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/printers/tableprinter_test.go
table := &metav1.Table{ ColumnDefinitions: test.columns, Rows: test.rows, } // Print the table out := bytes.NewBuffer([]byte{}) printer := NewTablePrinter(test.options) printer.PrintObj(table, out) // Validate the printed table is empty. if len(out.String()) > 0 { t.Errorf("Error Printing Table. Should be empty; got (%s)", out.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/cli-runtime/pkg/genericclioptions/template_flags_test.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jun 02 09:47:52 UTC 2023 - 5.9K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/printers/jsonpath.go
if err := j.Parse(tmpl); err != nil { return nil, err } return &JSONPathPrinter{ rawTemplate: tmpl, JSONPath: j, }, nil } // PrintObj formats the obj with the JSONPath Template. func (j *JSONPathPrinter) PrintObj(obj runtime.Object, w io.Writer) error { // we use reflect.Indirect here in order to obtain the actual value from a pointer.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Jun 25 16:23:43 UTC 2022 - 4.3K bytes - Viewed (0) -
cmd/kubeadm/app/cmd/config.go
cfg *kubeadmapi.InitConfiguration } // imageTextPrinter prints image info in a text form type imageTextPrinter struct { output.TextPrinter } // PrintObj is an implementation of ResourcePrinter.PrintObj for plain text output func (itp *imageTextPrinter) PrintObj(obj runtime.Object, writer io.Writer) error { var err error if imgs, ok := obj.(*outputapiv1alpha3.Images); ok {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 06:58:01 UTC 2024 - 18.9K bytes - Viewed (0)