alg

package
v0.0.0-...-969384c Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory func([]*Parameter) Processor

Factory for creating processor

type Parameter

type Parameter struct {
	// Evaluator for the rule
	Evaluator rule.Evaluator

	// Selectors for the rule
	Selectors []selector.Selector

	// Performer for the rule evaluator
	Performer action.Performer
}

Parameter for constructing a processor Represents one rule

type Processor

type Processor interface {
	// Process the artifact candidates
	//
	//  Arguments:
	//    artifacts []*art.Candidate : process the retention candidates
	//
	//  Returns:
	//    []*art.Result : the processed results
	//    error         : common error object if any errors occurred
	Process(ctx context.Context, artifacts []*selector.Candidate) ([]*selector.Result, error)
}

Processor processing the whole policy targeting a repository. Methods are defined to reflect the standard structure of the policy: list of rules with corresponding selectors plus an action performer.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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