factory

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorActionRequeue = errors.New("REQUEUE")

Functions

func FetchRBAAggregate

FetchRBAAggregate fetches RequestedBackupAction aggregate with all of its dependencies

Types

type CachedFetcher

type CachedFetcher struct {
	Cache  cache.Cache
	Client v1alpha1.RiotkitV1alpha1Interface
}

CachedFetcher is fetching objects collected by the controller-runtime

func (*CachedFetcher) FetchRequestedBackupAction

func (r *CachedFetcher) FetchRequestedBackupAction(ctx context.Context, req ctrl.Request) (*riotkitorgv1alpha1.RequestedBackupAction, error)

FetchRequestedBackupAction is fetching ScheduledBackup object from the cache

func (*CachedFetcher) FetchScheduledBackup

func (r *CachedFetcher) FetchScheduledBackup(ctx context.Context, req ctrl.Request) (*riotkitorgv1alpha1.ScheduledBackup, error)

FetchScheduledBackup is fetching ScheduledBackup object from the cache

type Factory

type Factory struct {
	client.Client
	// contains filtered or unexported fields
}

func NewFactory

func NewFactory(client client.Client, fetcher CachedFetcher, logger *logrus.Entry) *Factory

func (*Factory) CreateRequestedBackupActionAggregate

func (c *Factory) CreateRequestedBackupActionAggregate(ctx context.Context, action *v1alpha1.RequestedBackupAction, scheduledBackup *v1alpha1.ScheduledBackup) (*domain.RequestedBackupActionAggregate, error, error)

CreateRequestedBackupActionAggregate is creating a fully hydrated object (aggregate) with all dependencies inside

func (*Factory) CreateScheduledBackupAggregate

func (c *Factory) CreateScheduledBackupAggregate(ctx context.Context, backup *v1alpha1.ScheduledBackup, operation string) (*domain.ScheduledBackupAggregate, error, error)

CreateScheduledBackupAggregate is creating a fully hydrated object (aggregate) with all dependencies inside

Jump to

Keyboard shortcuts

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