common

package
v0.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package common contains common functions used by other packagess

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckSelector

func CheckSelector(selector models.Selector) error

CheckSelector ia a func to check if the syntax of the Selector is right. Strict and range syntax cannot be used together.

func DiscoveryStatusCheck

func DiscoveryStatusCheck(solver *nodecorev1alpha1.Solver, discovery *advertisementv1alpha1.Discovery)

DiscoveryStatusCheck checks the status of the discovery.

func FilterFlavor added in v0.1.0

func FilterFlavor(selector models.Selector, flavorCR *nodecorev1alpha1.Flavor) bool

FilterFlavor returns true if the Flavor CR fits the selector.

func FilterFlavorsBySelector added in v0.1.0

func FilterFlavorsBySelector(flavors []nodecorev1alpha1.Flavor, selector models.Selector) ([]nodecorev1alpha1.Flavor, error)

FilterFlavorsBySelector returns the Flavor CRs in the cluster that match the selector.

func FilterPeeringCandidate

func FilterPeeringCandidate(selector *nodecorev1alpha1.Selector, pc *advertisementv1alpha1.PeeringCandidate) bool

FilterPeeringCandidate filters the peering candidate based on the solver's flavor selector.

func ReservationStatusCheck

func ReservationStatusCheck(solver *nodecorev1alpha1.Solver, reservation *reservationv1alpha1.Reservation)

ReservationStatusCheck checks the status of the reservation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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