mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
vendor update for CSI 0.3.0
This commit is contained in:
22
vendor/k8s.io/kubernetes/pkg/printers/interface.go
generated
vendored
22
vendor/k8s.io/kubernetes/pkg/printers/interface.go
generated
vendored
@ -21,18 +21,13 @@ import (
|
||||
"io"
|
||||
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
||||
// ResourcePrinter is an interface that knows how to print runtime objects.
|
||||
type ResourcePrinter interface {
|
||||
// Print receives a runtime object, formats it and prints it to a writer.
|
||||
PrintObj(runtime.Object, io.Writer) error
|
||||
HandledResources() []string
|
||||
//Can be used to print out warning/clarifications if needed
|
||||
//after all objects were printed
|
||||
AfterPrint(io.Writer, string) error
|
||||
// Identify if it is a generic printer
|
||||
IsGeneric() bool
|
||||
}
|
||||
|
||||
// ResourcePrinterFunc is a function that can print objects
|
||||
@ -43,19 +38,6 @@ func (fn ResourcePrinterFunc) PrintObj(obj runtime.Object, w io.Writer) error {
|
||||
return fn(obj, w)
|
||||
}
|
||||
|
||||
// TODO: implement HandledResources()
|
||||
func (fn ResourcePrinterFunc) HandledResources() []string {
|
||||
return []string{}
|
||||
}
|
||||
|
||||
func (fn ResourcePrinterFunc) AfterPrint(io.Writer, string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (fn ResourcePrinterFunc) IsGeneric() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
type PrintOptions struct {
|
||||
// supported Format types can be found in pkg/printers/printers.go
|
||||
OutputFormatType string
|
||||
@ -68,7 +50,7 @@ type PrintOptions struct {
|
||||
ShowAll bool
|
||||
ShowLabels bool
|
||||
AbsoluteTimestamps bool
|
||||
Kind string
|
||||
Kind schema.GroupKind
|
||||
ColumnLabels []string
|
||||
|
||||
SortBy string
|
||||
|
Reference in New Issue
Block a user