- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 31 for printObj (0.21 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/typesetter.go
} // PrintObj is an implementation of ResourcePrinter.PrintObj which sets type information on the obj for the duration // of printing. It is NOT threadsafe. func (p *TypeSetterPrinter) PrintObj(obj runtime.Object, w io.Writer) error { if obj == nil { return p.Delegate.PrintObj(obj, w) } if !obj.GetObjectKind().GroupVersionKind().Empty() { return p.Delegate.PrintObj(obj, w) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 07 23:00:24 UTC 2019 - 2.6K 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/managedfields.go
return o } a.SetManagedFields(nil) return o } // PrintObj copies the object and omits the managed fields from the copied object before printing it. func (p *OmitManagedFieldsPrinter) PrintObj(obj runtime.Object, w io.Writer) error { if obj == nil { return p.Delegate.PrintObj(obj, w) } if meta.IsListType(obj) { obj = obj.DeepCopyObject()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Feb 16 14:52:03 UTC 2021 - 1.6K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/printers/name.go
// took place on an object, to be included in the // finalized "successful" message. Operation string } // PrintObj is an implementation of ResourcePrinter.PrintObj which decodes the object // and print "resource/name" pair. If the object is a List, print all items in it. func (p *NamePrinter) PrintObj(obj runtime.Object, w io.Writer) error { switch castObj := obj.(type) { case *metav1.WatchEvent: obj = castObj.Object.Object
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jun 28 23:24:54 UTC 2019 - 3.9K bytes - Viewed (0) -
pkg/printers/interface.go
type ResourcePrinter interface { // Print receives a runtime object, formats it and prints it to a writer. PrintObj(runtime.Object, io.Writer) error } // ResourcePrinterFunc is a function that can print objects type ResourcePrinterFunc func(runtime.Object, io.Writer) error // PrintObj implements ResourcePrinter func (fn ResourcePrinterFunc) PrintObj(obj runtime.Object, w io.Writer) error { return fn(obj, w)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Oct 23 06:45:08 UTC 2019 - 1.1K 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/template_test.go
return } if expected, ok := test.expectErr(err); !ok { t.Errorf("[%s]expect:\n %v\n but got:\n %v\n", test.name, expected, err) } return } err = p.PrintObj(test.obj, buffer) if err != nil { if test.expectErr == nil { t.Errorf("[%s]expected success but got:\n %v\n", test.name, err) return } if expected, ok := test.expectErr(err); !ok {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 22 23:10:00 UTC 2019 - 7.1K 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)