usecase

package
v0.0.0-...-d386c04 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateScannerExecuteRecoveryTask

func ValidateScannerExecuteRecoveryTask(prefix string, recovery *entities.RecoveryTask) error

Types

type Recovery

type Recovery interface {
	Scanner() Scanner
}

func New

func New(
	conf *config.Config,
	logger logging.Logger,
	infra *infrastructure.Infrastructure,
	repositories repositories.Repositories,
) Recovery

type Scanner

type Scanner interface {
	Schedule(ctx context.Context, in *ScannerScheduleIn) (*ScannerScheduleOut, error)
	Execute(ctx context.Context, in *ScannerExecuteIn) (*ScannerExecuteOut, error)
}

type ScannerExecuteIn

type ScannerExecuteIn struct {
	RecoveryBatchSize int
	Tasks             map[string]*entities.RecoveryTask
}

func (*ScannerExecuteIn) Validate

func (in *ScannerExecuteIn) Validate() error

type ScannerExecuteOut

type ScannerExecuteOut struct {
	Success []string
	Error   map[string]error
}

type ScannerScheduleIn

type ScannerScheduleIn struct {
	BatchSize int
	Buckets   []config.RecoveryCronjobBucket
}

func (*ScannerScheduleIn) Validate

func (in *ScannerScheduleIn) Validate() error

type ScannerScheduleOut

type ScannerScheduleOut struct {
	Success []string
	Error   map[string]error
}

Jump to

Keyboard shortcuts

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