Documentation
¶
Index ¶
- func NewContext() context.Context
- func NewCreateOptions() meta.CreateOptions
- func NewDeleteOptions() meta.DeleteOptions
- func NewGetOptions() meta.GetOptions
- func NewListOptions(labelsMaps ...map[string]string) meta.ListOptions
- func NewPatchOptions() meta.PatchOptions
- func NewUpdateOptions() meta.UpdateOptions
- func Poll(ctx context.Context, namespace, name string, opts *PollerOptions, ...) error
- type PollerBackgroundFunctions
- type PollerFunctions
- type PollerOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCreateOptions ¶
func NewCreateOptions() meta.CreateOptions
NewCreateOptions returns filled metav1.CreateOptions
func NewDeleteOptions ¶
func NewDeleteOptions() meta.DeleteOptions
NewDeleteOptions returns filled *metav1.DeleteOptions
func NewGetOptions ¶
func NewGetOptions() meta.GetOptions
NewGetOptions returns filled metav1.GetOptions
func NewListOptions ¶
func NewListOptions(labelsMaps ...map[string]string) meta.ListOptions
NewListOptions returns filled meta.ListOptions
func NewPatchOptions ¶
func NewPatchOptions() meta.PatchOptions
NewPatchOptions returns filled metav1.PatchOptions
func NewUpdateOptions ¶
func NewUpdateOptions() meta.UpdateOptions
NewUpdateOptions returns filled metav1.UpdateOptions
func Poll ¶
func Poll( ctx context.Context, namespace, name string, opts *PollerOptions, main *PollerFunctions, background *PollerBackgroundFunctions, ) error
Types ¶
type PollerFunctions ¶
type PollerFunctions struct { Get func(context.Context) (any, error) IsDone func(context.Context, any) bool ShouldContinue func(context.Context, any, error) bool }
func (*PollerFunctions) CallIsDone ¶
func (p *PollerFunctions) CallIsDone(c context.Context, a any) bool
func (*PollerFunctions) CallShouldContinue ¶
type PollerOptions ¶
type PollerOptions struct { StartBotheringAfterTimeout time.Duration GetErrorTimeout time.Duration Timeout time.Duration MainInterval time.Duration BackgroundInterval time.Duration }
PollerOptions specifies polling options
func NewPollerOptions ¶
func NewPollerOptions() *PollerOptions
NewPollerOptions creates new poll options
func (*PollerOptions) Ensure ¶
func (o *PollerOptions) Ensure() *PollerOptions
Ensure ensures poll options do exist
func (*PollerOptions) FromConfig ¶
func (o *PollerOptions) FromConfig(config *api.OperatorConfig) *PollerOptions
FromConfig makes poll options from config
func (*PollerOptions) SetGetErrorTimeout ¶
func (o *PollerOptions) SetGetErrorTimeout(timeout time.Duration) *PollerOptions
SetCreateTimeout sets create timeout
Click to show internal directories.
Click to hide internal directories.