Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BundleParser ¶
type IndexImageExtractor ¶
type MetaBundle ¶
type MetaBundle struct {
AddonMeta *v1alpha1.AddonMetadataSpec
Bundles []registry.Bundle
}
func NewMetaBundle ¶
func NewMetaBundle(addonMeta *v1alpha1.AddonMetadataSpec, bundles []registry.Bundle) *MetaBundle
type Middleware ¶
type ValidateFunc ¶
type ValidateFunc func(mb MetaBundle) ValidatorResult
type Validator ¶
type Validator struct {
Name string
Code string
Description string
Runner ValidateFunc
// Optional: override defaults from RetryMiddleware
RetryCount int
// Optional: override defaults from RetryMiddleware
RetryDelaySeconds int
}
func (Validator) WithRunner ¶
func (v Validator) WithRunner(fn ValidateFunc) Validator
WithRunner - Needs to create a new validator otherwise the memory address of the original Runner is lost, and it causes infinite loop scenarios (e.g.: RetryMiddleware)
type ValidatorResult ¶
type ValidatorResult struct {
// true if MetaBundle validation was successful
Success bool
// "" if validation is successful, else information about why it failed
FailureMsg string
// retports error that happened in the validation code
Error error
// if an error occured in the validation code, determines if it was retryable
RetryableError bool
}
ValidatorResult - encompasses validator result information
func (ValidatorResult) IsError ¶
func (vr ValidatorResult) IsError() bool
func (ValidatorResult) IsRetryableError ¶
func (vr ValidatorResult) IsRetryableError() bool
func (ValidatorResult) IsSuccess ¶
func (vr ValidatorResult) IsSuccess() bool
type ValidatorTest ¶
type ValidatorTest interface {
Name() string
Run(MetaBundle) ValidatorResult
SucceedingCandidates() ([]MetaBundle, error)
FailingCandidates() ([]MetaBundle, error)
}
Click to show internal directories.
Click to hide internal directories.