resourceforge

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package resourceforge contains different functions used to forge the different resources used into the FLUIDOS environment.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForgeAllocation added in v0.0.2

func ForgeAllocation(contract *reservationv1alpha1.Contract, intentID, nodeName string,
	destination nodecorev1alpha1.Destination, nodeType nodecorev1alpha1.NodeType) *nodecorev1alpha1.Allocation

ForgeAllocation creates an Allocation from a Contract.

func ForgeContract

ForgeContract creates a Contract CR.

func ForgeContractFromObj

func ForgeContractFromObj(contract *models.Contract) *reservationv1alpha1.Contract

ForgeContractFromObj creates a Contract from a reservation.

func ForgeContractObj

func ForgeContractObj(contract *reservationv1alpha1.Contract) models.Contract

ForgeContractObj creates a new Contract object.

func ForgeDiscovery

func ForgeDiscovery(selector *nodecorev1alpha1.FlavourSelector, solverID string) *advertisementv1alpha1.Discovery

ForgeDiscovery creates a Discovery CR from a FlavourSelector and a solverID.

func ForgeFlavourFromMetrics

func ForgeFlavourFromMetrics(node *models.NodeInfo, ni nodecorev1alpha1.NodeIdentity) (flavour *nodecorev1alpha1.Flavour)

ForgeFlavourFromMetrics creates a new flavour custom resource from the metrics of the node.

func ForgeFlavourFromObj

func ForgeFlavourFromObj(flavour *models.Flavour) *nodecorev1alpha1.Flavour

ForgeFlavourFromObj creates a Flavour CR from a Flavour Object (REAR).

func ForgeFlavourFromRef added in v0.0.2

func ForgeFlavourFromRef(f *nodecorev1alpha1.Flavour, char *nodecorev1alpha1.Characteristics) (flavour *nodecorev1alpha1.Flavour)

ForgeFlavourFromRef creates a new flavour starting from a Reference Flavour and the new Characteristics.

func ForgePartition

ForgePartition creates a Partition from a FlavourSelector.

func ForgePeeringCandidate

func ForgePeeringCandidate(flavourPeeringCandidate *nodecorev1alpha1.Flavour,
	solverID string, reserved bool) (pc *advertisementv1alpha1.PeeringCandidate)

ForgePeeringCandidate creates a PeeringCandidate CR from a Flavour and a Discovery.

func ForgeReservation

ForgeReservation creates a Reservation CR from a PeeringCandidate.

func ForgeResponsePurchaseObj

func ForgeResponsePurchaseObj(contract *models.Contract) *models.ResponsePurchase

ForgeResponsePurchaseObj creates a new response purchase.

func ForgeTransactionFromObj

func ForgeTransactionFromObj(transaction *models.Transaction) *reservationv1alpha1.Transaction

ForgeTransactionFromObj creates a transaction from a Transaction object.

func ForgeTransactionObj

func ForgeTransactionObj(id string, req *models.ReserveRequest) *models.Transaction

ForgeTransactionObj creates a new Transaction object.

Types

This section is empty.

Jump to

Keyboard shortcuts

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