Documentation ¶
Index ¶
- type DefaultProvider
- func (p *DefaultProvider) AddDeleteAnnotation(ctx context.Context, machine *capiv1beta1.Machine) error
- func (p *DefaultProvider) Get(ctx context.Context, providerID string) (*capiv1beta1.Machine, error)
- func (p *DefaultProvider) IsDeleting(machine *capiv1beta1.Machine) bool
- func (p *DefaultProvider) List(ctx context.Context, selector *metav1.LabelSelector) ([]*capiv1beta1.Machine, error)
- func (p *DefaultProvider) RemoveDeleteAnnotation(ctx context.Context, machine *capiv1beta1.Machine) error
- func (p *DefaultProvider) Update(ctx context.Context, machine *capiv1beta1.Machine) error
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultProvider ¶
type DefaultProvider struct {
// contains filtered or unexported fields
}
func NewDefaultProvider ¶
func NewDefaultProvider(_ context.Context, kubeClient client.Client) *DefaultProvider
func (*DefaultProvider) AddDeleteAnnotation ¶
func (p *DefaultProvider) AddDeleteAnnotation(ctx context.Context, machine *capiv1beta1.Machine) error
AddDeleteAnnotation adds the Cluster API deletion annotation to a Machine resource and updates the API server. It returns an error if there is a failure.
func (*DefaultProvider) Get ¶
func (p *DefaultProvider) Get(ctx context.Context, providerID string) (*capiv1beta1.Machine, error)
Get returns the Machine indicated by the supplied Provider ID or nil if not found. Because Get is used with a provider ID, it may return a Machine that does not have a label for node pool membership.
func (*DefaultProvider) IsDeleting ¶
func (p *DefaultProvider) IsDeleting(machine *capiv1beta1.Machine) bool
IsDeleting returns true if the supplied Machine has a non-zero deletion timestamp.
func (*DefaultProvider) List ¶
func (p *DefaultProvider) List(ctx context.Context, selector *metav1.LabelSelector) ([]*capiv1beta1.Machine, error)
func (*DefaultProvider) RemoveDeleteAnnotation ¶
func (p *DefaultProvider) RemoveDeleteAnnotation(ctx context.Context, machine *capiv1beta1.Machine) error
RemoveDeleteAnnotation removes the Cluster API deletion annotation from a Machine resource and updates the API server. It returns an error if there is a failure.
func (*DefaultProvider) Update ¶
func (p *DefaultProvider) Update(ctx context.Context, machine *capiv1beta1.Machine) error
type Provider ¶
type Provider interface { Get(context.Context, string) (*capiv1beta1.Machine, error) List(context.Context, *metav1.LabelSelector) ([]*capiv1beta1.Machine, error) IsDeleting(*capiv1beta1.Machine) bool AddDeleteAnnotation(context.Context, *capiv1beta1.Machine) error RemoveDeleteAnnotation(context.Context, *capiv1beta1.Machine) error Update(context.Context, *capiv1beta1.Machine) error }
Click to show internal directories.
Click to hide internal directories.