controller

package
v0.0.0-...-e01674c Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BucketAccessListener

type BucketAccessListener interface {
	GenericListener

	Add(ctx context.Context, b *v1alpha1.BucketAccess) error
	Update(ctx context.Context, old *v1alpha1.BucketAccess, new *v1alpha1.BucketAccess) error
	Delete(ctx context.Context, b *v1alpha1.BucketAccess) error
}

type BucketClaimListener

type BucketClaimListener interface {
	GenericListener

	Add(ctx context.Context, b *v1alpha1.BucketClaim) error
	Update(ctx context.Context, old *v1alpha1.BucketClaim, new *v1alpha1.BucketClaim) error
	Delete(ctx context.Context, b *v1alpha1.BucketClaim) error
}

type BucketClassListener

type BucketClassListener interface {
	GenericListener

	Add(ctx context.Context, b *v1alpha1.BucketClass) error
	Update(ctx context.Context, old *v1alpha1.BucketClass, new *v1alpha1.BucketClass) error
	Delete(ctx context.Context, b *v1alpha1.BucketClass) error
}

type BucketListener

type BucketListener interface {
	GenericListener

	Add(ctx context.Context, b *v1alpha1.Bucket) error
	Update(ctx context.Context, old *v1alpha1.Bucket, new *v1alpha1.Bucket) error
	Delete(ctx context.Context, b *v1alpha1.Bucket) error
}

type GenericListener

type GenericListener interface {
	InitializeKubeClient(kubeclientset.Interface)
	InitializeBucketClient(bucketclientset.Interface)
	InitializeEventRecorder(record.EventRecorder)
}

Set the clients for each of the listeners

type ObjectStorageController

type ObjectStorageController struct {
	LeaseDuration time.Duration
	RenewDeadline time.Duration
	RetryPeriod   time.Duration

	// Controller
	ResyncPeriod time.Duration

	// Listeners
	BucketListener            BucketListener
	BucketClaimListener       BucketClaimListener
	BucketAccessListener      BucketAccessListener
	BucketClassListener       BucketClassListener
	BucketAccessClassListener BucketAccessClassListener
	// contains filtered or unexported fields
}

func NewDefaultObjectStorageController

func NewDefaultObjectStorageController(identity string, leaderLockName string, threads int) (*ObjectStorageController, error)

func NewObjectStorageController

func NewObjectStorageController(identity string, leaderLockName string, threads int, limiter workqueue.RateLimiter) (*ObjectStorageController, error)

func NewObjectStorageControllerWithClientset

func NewObjectStorageControllerWithClientset(identity string, leaderLockName string, threads int, limiter workqueue.RateLimiter, kubeClient kubeclientset.Interface, bucketClient bucketclientset.Interface) (*ObjectStorageController, error)

func (*ObjectStorageController) AddBucketAccessClassListener

func (c *ObjectStorageController) AddBucketAccessClassListener(b BucketAccessClassListener)

func (*ObjectStorageController) AddBucketAccessListener

func (c *ObjectStorageController) AddBucketAccessListener(b BucketAccessListener)

func (*ObjectStorageController) AddBucketClaimListener

func (c *ObjectStorageController) AddBucketClaimListener(b BucketClaimListener)

func (*ObjectStorageController) AddBucketClassListener

func (c *ObjectStorageController) AddBucketClassListener(b BucketClassListener)

func (*ObjectStorageController) AddBucketListener

func (c *ObjectStorageController) AddBucketListener(b BucketListener)

func (*ObjectStorageController) GetOpLock

func (c *ObjectStorageController) GetOpLock(op types.UID) *sync.Mutex

func (*ObjectStorageController) OpLock

func (c *ObjectStorageController) OpLock(op types.UID)

func (*ObjectStorageController) OpUnlock

func (c *ObjectStorageController) OpUnlock(op types.UID)

func (*ObjectStorageController) Run

Run - runs the controller. Note that ctx must be cancellable i.e. ctx.Done() should not return nil

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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