Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextPrinter ¶ added in v0.0.2
type ContextPrinter interface { ResourcePrinter // WithOperation returns a new ContextPrinter for operation. The receiver // must not be mutated. WithOperation(operation string) ContextPrinter // WithContext returns a new ContextPrinter with the context values set. // The receiver must not be mutated. WithContext(context ...string) ContextPrinter }
ContextPrinter is a ResourcePrinter that can add context to printed object information.
func NewContextPrinter ¶ added in v0.0.2
func NewContextPrinter(color, dryRun bool) ContextPrinter
NewContextPrinter creates a new ContextPrinter.
func NewDiscardingContextPrinter ¶ added in v0.0.2
func NewDiscardingContextPrinter() ContextPrinter
NewDiscardingContextPrinter creates a ContextPrinter that just discards everything.
type RecordingPrinter ¶
type RecordingPrinter struct { Recorder recorders.OperationRecorder Operation string Printer ResourcePrinter }
RecordingPrinter records all objects it prints.
func NewRecordingPrinter ¶
func NewRecordingPrinter(r recorders.OperationRecorder, operation string, p ResourcePrinter) *RecordingPrinter
NewRecordingPrinter creates a new *RecordingPrinter that records all objects using r and afterwards prints them with p. The returned printer must only print objects for the given operation.
type ResourcePrinter ¶
type ResourcePrinter interface { // Print receives a runtime object, formats it and prints it to a writer. PrintObj(obj runtime.Object, w io.Writer) error }
ResourcePrinter prints runtime objects.
func NewColorPrinter ¶ added in v0.0.2
func NewColorPrinter(delegate ResourcePrinter, operation string) ResourcePrinter
NewColorPrinter wraps delegate with a color printer for given operation.
Click to show internal directories.
Click to hide internal directories.