coster

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRecommenderCoster

func NewRecommenderCoster() *recommender

func NewServerfulCoster

func NewServerfulCoster() *serverful

func NewServerlessCoster

func NewServerlessCoster() *serverless

Types

type Cost

type Cost struct {
	TotalCost              float64
	ServerfulCost          float64
	ServerlessCost         float64
	ServerfulPlatformCost  float64
	ServerlessPlatformCost float64
}

func (*Cost) Add

func (c *Cost) Add(other Cost)

type CosterContext

type CosterContext struct {
	// time seconds
	TimeSpanSeconds  int64
	Discount         *float64
	PodsSpec         map[string]spec.CloudPodSpec
	NodesSpec        map[string]spec.CloudNodeSpec
	WorkloadsSpec    map[string]map[types.NamespacedName]spec.CloudPodSpec
	WorkloadsRecSpec map[string]map[types.NamespacedName]*spec.WorkloadRecommendedData
	Pricer           cloud.Pricer
}

CosterContext used to compute cost given workload and node spec portrait, and time span, cloud pricer

type RecommendedCost

type RecommendedCost struct {
	TotalCost    float64
	PlatformCost float64
	WorkloadCost float64
}

func (*RecommendedCost) Add

func (rc *RecommendedCost) Add(other *RecommendedCost)

Jump to

Keyboard shortcuts

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