Documentation ¶
Index ¶
- Constants
- func DefaultToEnv(field *string, env, fallback string)
- func GetBestFitInstanceType(sortedInstanceTypeSpecList []InstanceTypeSpec, vcpus int64, memory int64) (string, error)
- func SelectInstanceTypeToUse(spec InstanceTypeSpec, specList []InstanceTypeSpec, ...) (string, error)
- func VerifyCloudInstanceType(instanceType string, validInstanceTypes []string, defaultInstanceType string) (string, error)
- type Instance
- type InstanceTypeSpec
- type Provider
- type Service
Constants ¶
View Source
const (
Version = "0.0.0"
)
Variables ¶
This section is empty.
Functions ¶
func DefaultToEnv ¶
func GetBestFitInstanceType ¶ added in v0.7.0
func GetBestFitInstanceType(sortedInstanceTypeSpecList []InstanceTypeSpec, vcpus int64, memory int64) (string, error)
Method to find the best fit instance type for the given memory and vcpus The sortedInstanceTypeSpecList slice is a sorted list of instance types based on ascending order of supported memory
func SelectInstanceTypeToUse ¶ added in v0.7.0
func SelectInstanceTypeToUse(spec InstanceTypeSpec, specList []InstanceTypeSpec, validInstanceTypes []string, defaultInstanceType string) (string, error)
Types ¶
type InstanceTypeSpec ¶ added in v0.7.0
type InstanceTypeSpec struct { InstanceType string VCPUs int64 Memory int64 Arch string GPUs int64 }
func SortInstanceTypesOnMemory ¶ added in v0.7.0
func SortInstanceTypesOnMemory(instanceTypeSpecList []InstanceTypeSpec) []InstanceTypeSpec
Method to sort InstanceTypeSpec into ascending order based on memory
type Service ¶
type Service interface { pb.HypervisorService GetInstanceID(ctx context.Context, podNamespace, podName string, wait bool) (string, error) Teardown() error }
func NewService ¶
func NewService(provider Provider, proxyFactory proxy.Factory, workerNode podnetwork.WorkerNode, podsDir, daemonPort string) Service
Click to show internal directories.
Click to hide internal directories.