Documentation ¶
Index ¶
- func ByChannelAndVersion(e1 *store.CachedBundle, e2 *store.CachedBundle) bool
- func ByVersionIncreasing(e1 *store.CachedBundle, e2 *store.CachedBundle) bool
- func NewUniquenessVariableSource() v2.VariableSource[*store.CachedBundle, OLMVariable, IterableOLMEntitySource]
- func OLMVariableSource(requiredPackages []*RequiredPackage, logger *logrus.Logger) (v2.VariableSource[*store.CachedBundle, OLMVariable, *OLMEntitySource], error)
- func Sort[E any](slice []E, fn Comparable[E])
- type BundleVariable
- type Comparable
- type DependenciesVariableSource
- type Installable
- type IterableOLMEntitySource
- type OLMEntitySet
- type OLMEntitySource
- type OLMSolver
- type OLMVariable
- func NewBundleVariable(entity *store.CachedBundle, orderedDependencies ...store.CachedBundle) OLMVariable
- func NewRequiredPackageVariable(id sat.Identifier, orderedEntities ...store.CachedBundle) OLMVariable
- func NewUniquenessVariable(id sat.Identifier, orderedEntities ...store.CachedBundle) OLMVariable
- type Option
- type Predicate
- func And[E any](predicates ...Predicate[E]) Predicate[E]
- func DependencyOf(entity *store.CachedBundle) Predicate[store.CachedBundle]
- func InChannel(channelName string) Predicate[store.CachedBundle]
- func InPackage(packageName string) Predicate[store.CachedBundle]
- func InRepository(repositoryName string) Predicate[store.CachedBundle]
- func InSemverRange(versionRange semver.Range) Predicate[store.CachedBundle]
- type RequiredPackage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByChannelAndVersion ¶
func ByChannelAndVersion(e1 *store.CachedBundle, e2 *store.CachedBundle) bool
func ByVersionIncreasing ¶
func ByVersionIncreasing(e1 *store.CachedBundle, e2 *store.CachedBundle) bool
func NewUniquenessVariableSource ¶
func NewUniquenessVariableSource() v2.VariableSource[*store.CachedBundle, OLMVariable, IterableOLMEntitySource]
func OLMVariableSource ¶
func OLMVariableSource(requiredPackages []*RequiredPackage, logger *logrus.Logger) (v2.VariableSource[*store.CachedBundle, OLMVariable, *OLMEntitySource], error)
func Sort ¶
func Sort[E any](slice []E, fn Comparable[E])
Types ¶
type BundleVariable ¶
type BundleVariable struct { *store.CachedBundle // contains filtered or unexported fields }
func (BundleVariable) Constraints ¶
func (b BundleVariable) Constraints() []sat.Constraint
func (BundleVariable) Identifier ¶
func (b BundleVariable) Identifier() sat.Identifier
func (BundleVariable) OrderedEntities ¶
func (b BundleVariable) OrderedEntities() []store.CachedBundle
type Comparable ¶
func ByChannelAndVersionPreferRepository ¶
func ByChannelAndVersionPreferRepository(repositoryID string) Comparable[store.CachedBundle]
type DependenciesVariableSource ¶
type DependenciesVariableSource struct {
// contains filtered or unexported fields
}
func NewBundleVariableSource ¶
func NewBundleVariableSource(seedEntities ...store.CachedBundle) *DependenciesVariableSource
func (*DependenciesVariableSource) GetVariables ¶
func (r *DependenciesVariableSource) GetVariables(ctx context.Context, source *OLMEntitySource) ([]OLMVariable, error)
type Installable ¶
type Installable struct { store.CachedBundle Dependencies map[string]store.CachedBundle }
type IterableOLMEntitySource ¶
type IterableOLMEntitySource interface { v2.EntitySource[*store.CachedBundle] Iterate(ctx context.Context, fn func(entity *store.CachedBundle) error) error }
func NewIterableEntitySource ¶
func NewIterableEntitySource(id v2.EntitySourceID, entities OLMEntitySet) IterableOLMEntitySource
type OLMEntitySet ¶
type OLMEntitySet map[v2.EntityID]store.CachedBundle
type OLMEntitySource ¶
type OLMEntitySource struct {
store.PackageDatabase
}
func (OLMEntitySource) Get ¶
func (s OLMEntitySource) Get(ctx context.Context, id v2.EntityID) (*store.CachedBundle, error)
func (OLMEntitySource) ID ¶
func (s OLMEntitySource) ID() v2.EntitySourceID
type OLMSolver ¶
type OLMSolver struct {
// contains filtered or unexported fields
}
func NewOLMSolver ¶
func NewOLMSolver(packageDB store.PackageDatabase, logger *logrus.Logger) *OLMSolver
func (*OLMSolver) Solve ¶
func (s *OLMSolver) Solve(ctx context.Context, requiredPackages ...*RequiredPackage) ([]Installable, error)
type OLMVariable ¶
type OLMVariable interface { sat.Variable OrderedEntities() []store.CachedBundle }
func NewBundleVariable ¶
func NewBundleVariable(entity *store.CachedBundle, orderedDependencies ...store.CachedBundle) OLMVariable
func NewRequiredPackageVariable ¶
func NewRequiredPackageVariable(id sat.Identifier, orderedEntities ...store.CachedBundle) OLMVariable
func NewUniquenessVariable ¶
func NewUniquenessVariable(id sat.Identifier, orderedEntities ...store.CachedBundle) OLMVariable
type Predicate ¶
func DependencyOf ¶
func DependencyOf(entity *store.CachedBundle) Predicate[store.CachedBundle]
func InRepository ¶
func InRepository(repositoryName string) Predicate[store.CachedBundle]
func InSemverRange ¶
func InSemverRange(versionRange semver.Range) Predicate[store.CachedBundle]
type RequiredPackage ¶
type RequiredPackage struct {
// contains filtered or unexported fields
}
func NewRequiredPackage ¶
func NewRequiredPackage(packageName string, options ...Option) (*RequiredPackage, error)
func (*RequiredPackage) GetVariables ¶
func (r *RequiredPackage) GetVariables(ctx context.Context, source *OLMEntitySource) ([]OLMVariable, error)
Click to show internal directories.
Click to hide internal directories.