instanceselector

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// VCPU is one virtual CPU core in EC2.
	VCPU int64 = 1024
	// MiB is 2^20 bytes.
	MiB int64 = 1024 * 1024
	// GiB is 2^30 bytes.
	GiB int64 = 1024 * MiB
)

Variables

This section is empty.

Functions

func AzureContainenrInstanceSelector

func AzureContainenrInstanceSelector(rs *api.ResourceSpec) (int64, int64, error)

func FargateInstanceSelector

func FargateInstanceSelector(rs *api.ResourceSpec) (int64, int64, error)

func GCEContainenrInstanceSelector

func GCEContainenrInstanceSelector(rs *api.ResourceSpec) (int64, int64, error)

func IsUnsupportedInstance

func IsUnsupportedInstance(instanceType string) bool

Used by validation code in Kip

func ResourcesToContainerInstance

func ResourcesToContainerInstance(rs *api.ResourceSpec) (int64, int64, error)

func ResourcesToInstanceType

func ResourcesToInstanceType(ps *api.PodSpec) (string, *bool, error)

func Setup

func Setup(cloud, region, zone, defaultInstanceType string) error

Types

type InstanceData

type InstanceData struct {
	InstanceType string  `json:"instanceType"`
	Price        float32 `json:"price"`
	GPU          int     `json:"gpu"`
	Memory       float32 `json:"memory"`
	CPU          float32 `json:"cpu"`
	Burstable    bool    `json:"burstable"`
	Baseline     float32 `json:"baseline"`
}

have the data in there

Jump to

Keyboard shortcuts

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