pkg

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: Apache-2.0 Imports: 0 Imported by: 4

Documentation

Index

Constants

View Source
const (
	EnvServerAddress                 = "ULTRON_SERVER_ADDRESS"
	EnvServerCertificateOrganization = "ULTRON_SERVER_CERTIFICATE_ORGANIZATION"
	EnvServerCertificateCommonName   = "ULTRON_SERVER_CERTIFICATE_COMMON_NAME"
	EnvServerCertificateDnsNames     = "ULTRON_SERVER_CERTIFICATE_DNS_NAMES"
	EnvServerCertificateIpAddresses  = "ULTRON_SERVER_CERTIFICATE_IP_ADDRESSES"
	EnvServerCertificateExportPath   = "ULTRON_SERVER_CERTIFICATE_EXPORT_PATH"
	EnvRedisServerAddress            = "ULTRON_REDIS_SERVER_ADDRESS"
	EnvRedisServerPassword           = "ULTRON_REDIS_SERVER_PASSWORD"
	EnvRedisServerDatabase           = "ULTRON_REDIS_SERVER_DATABASE"

	AnnotationDiskType    = "ultron.io/disk-type"
	AnnotationNetworkType = "ultron.io/network-type"
	AnnotationStorageSize = "ultron.io/storage-size"
	AnnotationPriority    = "ultron.io/priority"

	CacheKeyWeightedNodes                       = "ULTRON_WEIGHTED_NODES"
	CacheKeyDurableVmConfigurations             = "ULTRON_DURABLE_VMCONFIGURATION"
	CacheKeyDurableVmConfigurationLatencyRates  = "ULTRON_DURABLE_VMCONFIGURATION_LATENCY_RATES"
	CacheKeySpotVmConfigurations                = "ULTRON_SPOT_VMCONFIGURATION"
	CacheKeySpotVmConfigurationInteruptionRates = "ULTRON_SPOT_VMCONFIGURATION_INTERUPTION_RATES"

	ComputeTypeDurable   ComputeType = "durable"
	ComputeTypeEphemeral ComputeType = "ephemeral"

	DefaultDiskType              = "SSD"
	DefaultNetworkType           = "isolated"
	DefaultStorageSizeGB         = 10.0
	DefaultPriority              = PriorityLow
	DefaultDurableInstanceType   = "ultron.durable"
	DefaultEphemeralInstanceType = "ultron.ephemeral"

	LabelHostName     = "kubernetes.io/hostname"
	LabelInstanceType = "node.kubernetes.io/instance-type"

	MetadataName = "metadata.name"

	PriorityLow  PriorityEnum = false
	PriorityHigh PriorityEnum = true
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ComputeConfiguration

type ComputeConfiguration struct {
	Id                *int32       `json:"id,omitempty"`
	ProviderId        *int32       `json:"providerId,omitempty"`
	ProviderName      *string      `json:"providerName,omitempty"`
	LocationId        *int32       `json:"locationId,omitempty"`
	LocationName      *string      `json:"locationName,omitempty"`
	DataCenterId      *string      `json:"dataCenterId,omitempty"`
	DataCenterName    *string      `json:"dataCenterName,omitempty"`
	OsId              *int32       `json:"osId,omitempty"`
	OsType            *string      `json:"osType,omitempty"`
	OsVersion         *string      `json:"osVersion,omitempty"`
	CloudNetworkTypes []string     `json:"cloudNetworkTypes,omitempty"`
	VCpuType          *string      `json:"vCpuType,omitempty"`
	VCpu              *int32       `json:"vCpu,omitempty"`
	RamGb             *int32       `json:"ramGb,omitempty"`
	VolumeGb          *int32       `json:"volumeGb,omitempty"`
	VolumeType        *string      `json:"volumeType,omitempty"`
	Cost              *ComputeCost `json:"cost,omitempty"`
	ComputeType       ComputeType  `json:"computeType,omitempty"`
}

type ComputeCost added in v0.0.6

type ComputeCost struct {
	Unit         *string  `json:"unit,omitempty"`
	Currency     *string  `json:"currency,omitempty"`
	PricePerUnit *float32 `json:"pricePerUnit,omitempty"`
}

type ComputeType

type ComputeType string

type PriorityEnum

type PriorityEnum bool

func (PriorityEnum) String

func (p PriorityEnum) String() string

type WeightedInteruptionRate

type WeightedInteruptionRate struct {
	Selector map[string]string
	Value    float64
}

type WeightedLatencyRate

type WeightedLatencyRate struct {
	Selector map[string]string
	Value    float64
}

type WeightedNode

type WeightedNode struct {
	Selector         map[string]string
	AvailableCPU     float64
	TotalCPU         float64
	AvailableMemory  float64
	TotalMemory      float64
	AvailableStorage float64
	TotalStorage     float64
	DiskType         string
	NetworkType      string
	Price            float64
	MedianPrice      float64
	InstanceType     string
	InterruptionRate WeightedInteruptionRate
	LatencyRate      WeightedLatencyRate
}

type WeightedPod

type WeightedPod struct {
	Selector             map[string]string
	RequestedCPU         float64
	RequestedMemory      float64
	RequestedStorage     float64
	RequestedDiskType    string
	RequestedNetworkType string
	LimitCPU             float64
	LimitMemory          float64
	Priority             PriorityEnum
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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