handler

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppDeploymentHandler

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

func (*AppDeploymentHandler) EnsureApplicationValid

func (a *AppDeploymentHandler) EnsureApplicationValid(ctx context.Context) (reconciler.OperationResult, error)

func (*AppDeploymentHandler) EnsureDependenciesReady

func (a *AppDeploymentHandler) EnsureDependenciesReady(ctx context.Context) (reconciler.OperationResult, error)

func (*AppDeploymentHandler) EnsureDeployingFinished

func (a *AppDeploymentHandler) EnsureDeployingFinished(ctx context.Context) (reconciler.OperationResult, error)

EnsureDeployingFinished checks if the provision job exists if not exist then create a new provision job if job is exist && running then requeue and waiting for the job complete if job is exist && failed then delete the job and create a new one if job is exist && succeeded then update the appdeployment status to ready

func (*AppDeploymentHandler) EnsureFinalizer

func (*AppDeploymentHandler) EnsureFinalizerDeleted

func (a *AppDeploymentHandler) EnsureFinalizerDeleted(ctx context.Context) (reconciler.OperationResult, error)

func (*AppDeploymentHandler) EnsureTeardownFinished

func (a *AppDeploymentHandler) EnsureTeardownFinished(ctx context.Context) (reconciler.OperationResult, error)

type AppDeploymentHandlerInterface

type AppDeploymentHandlerInterface interface {
	EnsureApplicationValid(ctx context.Context) (reconciler.OperationResult, error)
	EnsureFinalizer(ctx context.Context) (reconciler.OperationResult, error)
	EnsureFinalizerDeleted(ctx context.Context) (reconciler.OperationResult, error)
	EnsureDependenciesReady(ctx context.Context) (reconciler.OperationResult, error)
	EnsureDeployingFinished(ctx context.Context) (reconciler.OperationResult, error)
	EnsureTeardownFinished(ctx context.Context) (reconciler.OperationResult, error)
}

func NewAppDeploymentHandler

func NewAppDeploymentHandler(ctx context.Context, appDeployment *v1alpha1.AppDeployment, logger logr.Logger, client client.Client, recorder record.EventRecorder) AppDeploymentHandlerInterface

type AppdeploymentHandlerContextKey

type AppdeploymentHandlerContextKey struct{}

type CacheHandler

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

func (*CacheHandler) AdjustCache

func (*CacheHandler) CalculateKeepAliveCount

func (c *CacheHandler) CalculateKeepAliveCount(ctx context.Context) (reconciler.OperationResult, error)

CalculateKeepAliveCount calculates the keepAliveCount for the cache cr

func (*CacheHandler) CheckCacheExpiry

func (c *CacheHandler) CheckCacheExpiry(ctx context.Context) (reconciler.OperationResult, error)

CheckCacheExpiry checks if the cache cr is expired. If it is, the cr is deleted.

func (*CacheHandler) EnsureCacheInitialized

func (c *CacheHandler) EnsureCacheInitialized(ctx context.Context) (reconciler.OperationResult, error)

EnsureCacheInitialized ensures the cache cr is initialized

type CacheHandlerInterface

type CacheHandlerInterface interface {
	CheckCacheExpiry(ctx context.Context) (reconciler.OperationResult, error)
	EnsureCacheInitialized(ctx context.Context) (reconciler.OperationResult, error)
	CalculateKeepAliveCount(ctx context.Context) (reconciler.OperationResult, error)
	AdjustCache(ctx context.Context) (reconciler.OperationResult, error)
}

func NewCacheHandler

func NewCacheHandler(ctx context.Context,
	cache *v1alpha1.Cache, logger logr.Logger, client client.Client, scheme *runtime.Scheme, recorder record.EventRecorder,
	fn func(owner, controlled metav1.Object, scheme *runtime.Scheme, opts ...controllerutil.OwnerReferenceOption) error) CacheHandlerInterface

type OperationContextKey

type OperationContextKey struct{}

type OperationHandler

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

func (*OperationHandler) EnsureAllAppsAreDeleted

func (o *OperationHandler) EnsureAllAppsAreDeleted(ctx context.Context) (reconciler.OperationResult, error)

func (*OperationHandler) EnsureAllAppsAreReady

func (o *OperationHandler) EnsureAllAppsAreReady(ctx context.Context) (reconciler.OperationResult, error)

func (*OperationHandler) EnsureFinalizer

func (o *OperationHandler) EnsureFinalizer(ctx context.Context) (reconciler.OperationResult, error)

func (*OperationHandler) EnsureFinalizerRemoved

func (o *OperationHandler) EnsureFinalizerRemoved(ctx context.Context) (reconciler.OperationResult, error)

func (*OperationHandler) EnsureNotExpired

func (o *OperationHandler) EnsureNotExpired(ctx context.Context) (reconciler.OperationResult, error)

type OperationHandlerInterface

type OperationHandlerInterface interface {
	EnsureNotExpired(ctx context.Context) (reconciler.OperationResult, error)
	EnsureFinalizer(ctx context.Context) (reconciler.OperationResult, error)
	EnsureFinalizerRemoved(ctx context.Context) (reconciler.OperationResult, error)
	EnsureAllAppsAreReady(ctx context.Context) (reconciler.OperationResult, error)
	EnsureAllAppsAreDeleted(ctx context.Context) (reconciler.OperationResult, error)
}

func NewOperationHandler

func NewOperationHandler(ctx context.Context, operation *v1alpha1.Operation, logger logr.Logger, client client.Client, recorder record.EventRecorder) OperationHandlerInterface

type RequiremenContextKey

type RequiremenContextKey struct{}

type RequirementHandler

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

func (*RequirementHandler) EnsureCacheExisted

func (r *RequirementHandler) EnsureCacheExisted(ctx context.Context) (reconciler.OperationResult, error)

func (*RequirementHandler) EnsureCachedOperationAcquired

func (r *RequirementHandler) EnsureCachedOperationAcquired(ctx context.Context) (reconciler.OperationResult, error)

func (*RequirementHandler) EnsureInitialized

func (r *RequirementHandler) EnsureInitialized(ctx context.Context) (reconciler.OperationResult, error)

func (*RequirementHandler) EnsureNotExpired

func (r *RequirementHandler) EnsureNotExpired(ctx context.Context) (reconciler.OperationResult, error)

func (*RequirementHandler) EnsureOperationReady

func (r *RequirementHandler) EnsureOperationReady(ctx context.Context) (reconciler.OperationResult, error)

type RequirementHandlerInterface

type RequirementHandlerInterface interface {
	EnsureNotExpired(ctx context.Context) (reconciler.OperationResult, error)
	EnsureInitialized(ctx context.Context) (reconciler.OperationResult, error)
	EnsureCacheExisted(ctx context.Context) (reconciler.OperationResult, error)
	EnsureCachedOperationAcquired(ctx context.Context) (reconciler.OperationResult, error)
	EnsureOperationReady(ctx context.Context) (reconciler.OperationResult, error)
}

func NewRequirementHandler

func NewRequirementHandler(ctx context.Context, requirement *v1alpha1.Requirement, logger logr.Logger, client client.Client, recorder record.EventRecorder) RequirementHandlerInterface

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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