bucket

package
v0.0.0-...-897080a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BucketListener

type BucketListener struct {
	// contains filtered or unexported fields
}

BucketListener manages Bucket objects

func NewBucketListener

func NewBucketListener(driverName string, client cosi.ProvisionerClient) *BucketListener

NewBucketListener returns a resource handler for Bucket objects

func (*BucketListener) Add

func (b *BucketListener) Add(ctx context.Context, inputBucket *v1alpha1.Bucket) error

Add attempts to create a bucket for a given bucket. This function must be idempotent

Return values

  • nil - Bucket successfully provisioned
  • non-nil err - Internal error [requeue'd with exponential backoff]

func (*BucketListener) Delete

func (b *BucketListener) Delete(ctx context.Context, inputBucket *v1alpha1.Bucket) error

Delete attemps to delete a bucket. This function must be idempotent Delete function is called when the bucket was not able to add finalizers while creation. Hence we will take care of removing the BucketClaim finalizer before deleting the Bucket object. Return values

  • nil - Bucket successfully deleted
  • non-nil err - Internal error [requeue'd with exponential backoff]

func (*BucketListener) InitializeBucketClient

func (b *BucketListener) InitializeBucketClient(bc buckets.Interface)

InitializeBucketClient initializes the object storage bucket client

func (*BucketListener) InitializeEventRecorder

func (b *BucketListener) InitializeEventRecorder(er record.EventRecorder)

InitializeEventRecorder initializes the event recorder

func (*BucketListener) InitializeKubeClient

func (b *BucketListener) InitializeKubeClient(k kube.Interface)

InitializeKubeClient initializes the kubernetes client

func (*BucketListener) Update

func (b *BucketListener) Update(ctx context.Context, old, new *v1alpha1.Bucket) error

Update attempts to reconcile changes to a given bucket. This function must be idempotent Return values

  • nil - Bucket successfully reconciled
  • non-nil err - Internal error [requeue'd with exponential backoff]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL