contractmanager

package
v0.0.4 Latest Latest
Warning

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

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

Documentation

Overview

Package contractmanager implements the utility functions for the contract manager controller

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Purchase

type Purchase struct {
	TransactionID string `json:"transactionID"`
	FlavourID     string `json:"flavourID"`
	BuyerID       string `json:"buyerID"`
}

Purchase contains information regarding the purchase for a flavour.

type ReservationReconciler

type ReservationReconciler struct {
	client.Client
	Scheme  *runtime.Scheme
	Gateway *gateway.Gateway
}

ReservationReconciler reconciles a Reservation object.

func (*ReservationReconciler) Reconcile

func (r *ReservationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.11.2/pkg/reconcile

func (*ReservationReconciler) SetupWithManager

func (r *ReservationReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type ResponsePurchase

type ResponsePurchase struct {
	FlavourID string `json:"flavourID"`
	BuyerID   string `json:"buyerID"`
	Status    string `json:"status"`
}

ResponsePurchase contain information after purchase a Flavour.

type Selector

type Selector struct {
	FlavourType      string `json:"type,omitempty"`
	CPU              int    `json:"cpu,omitempty"`
	RAM              int    `json:"ram,omitempty"`
	EphemeralStorage int    `json:"ephemeral-storage,omitempty"`
}

Selector represents the criteria for selecting Flavours.

type Transaction

type Transaction struct {
	TransactionID string    `json:"transactionID"`
	FlavourID     string    `json:"flavourID"`
	StartTime     time.Time `json:"startTime,omitempty"`
}

Transaction contains information regarding the transaction for a flavour.

Jump to

Keyboard shortcuts

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