 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCmdWait ¶
func NewCmdWait(restClientGetter genericclioptions.RESTClientGetter, streams genericclioptions.IOStreams) *cobra.Command
NewCmdWait returns a cobra command for waiting
Types ¶
type ConditionFunc ¶
type ConditionFunc func(info *resource.Info, o *WaitOptions) (finalObject runtime.Object, done bool, err error)
ConditionFunc is the interface for providing condition checks
type ConditionalWait ¶
type ConditionalWait struct {
	// contains filtered or unexported fields
}
    ConditionalWait hold information to check an API status condition
func (ConditionalWait) IsConditionMet ¶
func (w ConditionalWait) IsConditionMet(info *resource.Info, o *WaitOptions) (runtime.Object, bool, error)
IsConditionMet is a conditionfunc for waiting on an API condition to be met
type WaitFlags ¶
type WaitFlags struct {
	RESTClientGetter     genericclioptions.RESTClientGetter
	PrintFlags           *genericclioptions.PrintFlags
	ResourceBuilderFlags *genericclioptions.ResourceBuilderFlags
	Timeout      time.Duration
	ForCondition string
	genericclioptions.IOStreams
}
    WaitFlags 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 NewWaitFlags ¶
func NewWaitFlags(restClientGetter genericclioptions.RESTClientGetter, streams genericclioptions.IOStreams) *WaitFlags
NewWaitFlags returns a default WaitFlags
type WaitOptions ¶
type WaitOptions struct {
	ResourceFinder genericclioptions.ResourceFinder
	DynamicClient  dynamic.Interface
	Timeout        time.Duration
	Printer     printers.ResourcePrinter
	ConditionFn ConditionFunc
	genericclioptions.IOStreams
}
    WaitOptions is a set of options that allows you to wait. This is the object reflects the runtime needs of a wait command, making the logic itself easy to unit test with our existing mocks.