Documentation
¶
Index ¶
- Constants
- type Algorithm
- type IAlgorithm
- func (a *IAlgorithm) NetworkScore(node ultron.WeightedNode, pod ultron.WeightedPod) float64
- func (a *IAlgorithm) NodeScore(node ultron.WeightedNode) float64
- func (a *IAlgorithm) PodScore(pod ultron.WeightedPod) float64
- func (a *IAlgorithm) PriceScore(node ultron.WeightedNode) float64
- func (a *IAlgorithm) ResourceScore(node ultron.WeightedNode, pod ultron.WeightedPod) float64
- func (a *IAlgorithm) StorageScore(node ultron.WeightedNode, pod ultron.WeightedPod) float64
- func (a *IAlgorithm) TotalScore(node ultron.WeightedNode, pod ultron.WeightedPod) float64
Constants ¶
View Source
const ( Alpha = 1.0 // ResourceScore weight Beta = 0.5 // StorageScore weight Gamma = 0.5 // NetworkScore weight Delta = 1.0 // PriceScore weight Epsilon = 1.0 // NodeScore weight Zeta = 0.8 // PodScore weight )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Algorithm ¶
type Algorithm interface { ResourceScore(node ultron.WeightedNode, pod ultron.WeightedPod) float64 StorageScore(node ultron.WeightedNode, pod ultron.WeightedPod) float64 NetworkScore(node ultron.WeightedNode, pod ultron.WeightedPod) float64 PriceScore(node ultron.WeightedNode) float64 NodeScore(node ultron.WeightedNode) float64 PodScore(pod ultron.WeightedPod) float64 TotalScore(node ultron.WeightedNode, pod ultron.WeightedPod) float64 }
type IAlgorithm ¶
type IAlgorithm struct { }
func NewIAlgorithm ¶
func NewIAlgorithm() *IAlgorithm
func (*IAlgorithm) NetworkScore ¶
func (a *IAlgorithm) NetworkScore(node ultron.WeightedNode, pod ultron.WeightedPod) float64
func (*IAlgorithm) NodeScore ¶
func (a *IAlgorithm) NodeScore(node ultron.WeightedNode) float64
func (*IAlgorithm) PodScore ¶
func (a *IAlgorithm) PodScore(pod ultron.WeightedPod) float64
func (*IAlgorithm) PriceScore ¶
func (a *IAlgorithm) PriceScore(node ultron.WeightedNode) float64
func (*IAlgorithm) ResourceScore ¶
func (a *IAlgorithm) ResourceScore(node ultron.WeightedNode, pod ultron.WeightedPod) float64
func (*IAlgorithm) StorageScore ¶
func (a *IAlgorithm) StorageScore(node ultron.WeightedNode, pod ultron.WeightedPod) float64
func (*IAlgorithm) TotalScore ¶
func (a *IAlgorithm) TotalScore(node ultron.WeightedNode, pod ultron.WeightedPod) float64
Click to show internal directories.
Click to hide internal directories.