usecase

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CollectorAndRepository

type CollectorAndRepository struct {
	// We have to use any here because of the different data types.
	Collector  any
	Repository any
}

type CreateArchiveUseCase

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

func NewCreateArchiveUseCase

func NewCreateArchiveUseCase(supportArchivesInterface supportArchiveV1Interface, collectorMapping CollectorMapping, supportArchiveRepository supportArchiveRepository) *CreateArchiveUseCase

func (*CreateArchiveUseCase) HandleArchiveRequest

func (c *CreateArchiveUseCase) HandleArchiveRequest(ctx context.Context, cr *libapi.SupportArchive) (time.Duration, error)

HandleArchiveRequest processes the support archive custom resource. It reads the actual state and executes the next data collector. If there are remaining collectors after execution, the method returns (true, nil) to indicate a necessary requeue. If there are no remaining collectors, the method returns (false, nil).

type DeleteArchiveUseCase

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

func NewDeleteArchiveUseCase

func NewDeleteArchiveUseCase(collectorMapping CollectorMapping, supportArchiveRepository supportArchiveRepository) *DeleteArchiveUseCase

func (*DeleteArchiveUseCase) Delete

type GarbageCollectionUseCase added in v1.0.0

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

func NewGarbageCollectionUseCase added in v1.0.0

func NewGarbageCollectionUseCase(
	supportArchivesInterface supportArchiveInterface,
	supportArchiveRepository supportArchiveRepository,
	supportArchiveDeleteHandler deleteArchiveHandler,
	interval time.Duration,
	numberToKeep int,
) *GarbageCollectionUseCase

func (*GarbageCollectionUseCase) CollectGarbageWithInterval added in v1.0.0

func (g *GarbageCollectionUseCase) CollectGarbageWithInterval(ctx context.Context) error

type SyncArchiveUseCase

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

func NewSyncArchiveUseCase

func NewSyncArchiveUseCase(
	supportArchivesInterface supportArchiveV1Interface,
	supportArchiveRepository supportArchiveRepository,
	supportArchiveDeleteHandler deleteArchiveHandler,
	syncInterval time.Duration,
	namespace string,
	reconciliationTrigger chan<- event.GenericEvent,
) *SyncArchiveUseCase

func (*SyncArchiveUseCase) SyncArchivesWithInterval

func (s *SyncArchiveUseCase) SyncArchivesWithInterval(ctx context.Context) error

Jump to

Keyboard shortcuts

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