common

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 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 AllocationStatusCheck added in v0.1.0

func AllocationStatusCheck(solver *nodecorev1alpha1.Solver, allocation *nodecorev1alpha1.Allocation)

AllocationStatusCheck checks the status of the allocation.

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