- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for PrintObj (0.14 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/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) -
staging/src/k8s.io/cli-runtime/pkg/genericclioptions/jsonpath_flags_test.go
} return } if err != nil { t.Fatalf("unexpected error: %v", err) } out := bytes.NewBuffer([]byte{}) err = p.PrintObj(testObject, out) if len(tc.expectedParseError) > 0 { if err == nil || !strings.Contains(err.Error(), tc.expectedParseError) { t.Errorf("expecting error %q, got %v", tc.expectedError, err) } return
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jun 02 09:47:52 UTC 2023 - 6.7K bytes - Viewed (0) -
pkg/printers/tablegenerator.go
printFunc reflect.Value } // HumanReadableGenerator is an implementation of TableGenerator used to generate // a table for a specific resource. The table is printed with a TablePrinter using // PrintObj(). type HumanReadableGenerator struct { handlerMap map[reflect.Type]*handlerEntry } var _ TableGenerator = &HumanReadableGenerator{} var _ PrintHandler = &HumanReadableGenerator{}
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jul 26 17:14:05 UTC 2022 - 5.9K bytes - Viewed (0)