Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCmdEvents ¶
func NewCmdEvents(restClientGetter genericclioptions.RESTClientGetter, streams genericclioptions.IOStreams) *cobra.Command
NewCmdEvents creates a new events command
Types ¶
type EventPrinter ¶ added in v0.25.0
type EventPrinter struct {
NoHeaders bool
AllNamespaces bool
// contains filtered or unexported fields
}
EventPrinter stores required fields to be used for default printing for events command.
func NewEventPrinter ¶ added in v0.25.0
func NewEventPrinter(noHeader, allNamespaces bool) *EventPrinter
type EventsFlags ¶
type EventsFlags struct {
RESTClientGetter genericclioptions.RESTClientGetter
PrintFlags *genericclioptions.PrintFlags
AllNamespaces bool
Watch bool
NoHeaders bool
ForObject string
FilterTypes []string
ChunkSize int64
genericclioptions.IOStreams
}
EventsFlags directly reflect the information that CLI is gathering via flags. They will be converted to Options, which reflect the runtime requirements for the command. This structure reduces the transformation to wiring and makes the logic itself easy to unit test.
func NewEventsFlags ¶
func NewEventsFlags(restClientGetter genericclioptions.RESTClientGetter, streams genericclioptions.IOStreams) *EventsFlags
NewEventsFlags returns a default EventsFlags
type EventsOptions ¶
type EventsOptions struct {
Namespace string
AllNamespaces bool
Watch bool
FilterTypes []string
PrintObj printers.ResourcePrinterFunc
genericclioptions.IOStreams
// contains filtered or unexported fields
}
EventsOptions is a set of options that allows you to list events. This is the object reflects the runtime needs of an events command, making the logic itself easy to unit test.
type SortableEvents ¶
type SortableEvents []corev1.Event
SortableEvents implements sort.Interface for []api.Event by time