strategy

package
v0.0.0-...-91936fa Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudResource

type CloudResource interface {
	GetResourceMetrics() (*ResourceMetrics, error)
}

type ResourceMetrics

type ResourceMetrics struct {
	// Network Latency
	Distance int32

	// this field will be compared to Total
	Used int32

	// a custom number to represent the total size of resource
	Total int32

	// how many requests(128MB 1s) a unit of resource can handle
	StandardUnitToRequests int32
}

type ResourceStrategy

type ResourceStrategy interface {
	SelectN([]CloudResource, int32) ([]CloudResource, error)
	Select([]CloudResource) (CloudResource, error)
}

func NewPriceFirstStrategy

func NewPriceFirstStrategy() (ResourceStrategy, error)

Jump to

Keyboard shortcuts

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