Documentation ¶
Index ¶
- Constants
- func MillisecondsToSeconds(m float64) float64
- func ParseIntervalToSeconds(interval string) int64
- func ParseURL(endpoint string, parameters map[string]string) string
- func RoundN(value float64, decimals float64) float64
- type Component
- type FlagVars
- type ForecastComponent
- type PolicySettings
- type PricingModel
- type ScalingHorizon
- type SystemConfiguration
Constants ¶
View Source
const ( HOUR = "h" SECOND = "s" MINUTE = "m" MONTH = "M" DAY = "D" )
View Source
const ALWAYS_RESIZE_ALGORITHM = "always-resize"
View Source
const BEST_RESOURCE_PAIR_ALGORITHM = "best-resource-pair"
View Source
const CONFIG_FILE = "config.yml"
View Source
const COST = "cost"
metrics
View Source
const DEFAULT_LOGFILE = "Logs.log"
View Source
const DEFAULT_POD_BOOT_TIME = 20
View Source
const DEFAULT_VM_BOOT_TIME = 20
View Source
const DEFAULT_VM_SHUTDOWN_TIME = 35
View Source
const DERIVATION_TIME = "derivation-time"
View Source
const ENDPOINT_ALL_VM_TIMES = "/getPerVMTypeAllBootShutDownData"
View Source
const ENDPOINT_CURRENT_STATE = "/api/current"
View Source
const ENDPOINT_FORECAST = "/predict"
View Source
const ENDPOINT_INVALIDATE_STATES = "/api/invalidate/{timestamp}"
View Source
const ENDPOINT_RECIVE_NOTIFICATIONS = "/api/forecast"
View Source
const ENDPOINT_SERVICE_PROFILES = "/getRegressionTRNsMongoDBAll/{apptype}/{appname}/{mainservicename}"
View Source
const ENDPOINT_SERVICE_PROFILE_BY_MSC = "/getPredictedRegressionReplicas/{apptype}/{appname}/{mainservicename}/{msc}/{numcoresutil}/{numcoreslimit}/{nummemlimit}"
View Source
const ENDPOINT_SERVICE_PROFILE_BY_REPLICAS = "/getPredictedRegressionTRN/{apptype}/{appname}/{mainservicename}/{replicas}/{numcoresutil}/{numcoreslimit}/{nummemlimit}"
View Source
const ENDPOINT_STATES = "/api/states"
View Source
const ENDPOINT_SUBSCRIBE_NOTIFICATIONS = "/subscribe"
View Source
const ENDPOINT_VMS_PROFILES = "/api/vms"
View Source
const ENDPOINT_VM_TIMES = "/getPerVMTypeOneBootShutDownData"
View Source
const NAIVE_ALGORITHM = "naive"
Algorithms names
View Source
const ONLY_DELTA_ALGORITHM = "only-delta-load"
View Source
const PERCENTAGE_REQUIRED_k8S_INSTALLATION_CPU = 0.06
View Source
const PERCENTAGE_REQUIRED_k8S_INSTALLATION_MEM = 0.25
View Source
const RESIZE_WHEN_BENEFICIAL = "resize-when-beneficial"
View Source
const SCALE_METHOD_HORIZONTAL = "horizontal"
Algorithms options
View Source
const SCALE_METHOD_HYBRID = "hybrid"
View Source
const SCALE_METHOD_VERTICAL = "vertical"
View Source
const TIME_ADD_NODE_TO_K8S = 120
View Source
const TIME_CONTAINER_START = 10
View Source
const TRANSITION_TIME = "transition-time"
View Source
const UTC_TIME_LAYOUT = "2006-01-02T15:04:00Z"
Variables ¶
This section is empty.
Functions ¶
func MillisecondsToSeconds ¶
Utility function to convert from milliseconds to seconds in: @m miliseconds out: @float seconds
func ParseIntervalToSeconds ¶
Types ¶
type Component ¶
type Component struct { Endpoint string `yaml:"endpoint"` Username string `yaml:"username"` Password string `yaml:"password"` ApiKey string `yaml:"api-key"` }
Struct that models the external components to which SPDT should be connected
type ForecastComponent ¶
type ForecastComponent struct { Endpoint string `yaml:"endpoint"` Granularity string `yaml:"granularity"` }
Struct that models the external components to which SPDT should be connected
type PolicySettings ¶
type PricingModel ¶
type ScalingHorizon ¶
type ScalingHorizon struct { StartTime time.Time `yaml:"start-time"` EndTime time.Time `yaml:"end-time"` }
The future timespan for which the autoscaling policy is derived
type SystemConfiguration ¶
type SystemConfiguration struct { Host string `yaml:"host"` CSP string `yaml:"CSP"` Region string `yaml:"region"` AppName string `yaml:"app-name"` MainServiceName string `yaml:"main-service-name"` AppType string `yaml:"app-type"` PricingModel PricingModel `yaml:"pricing-model"` ForecastComponent ForecastComponent `yaml:"forecasting-component"` PerformanceProfilesComponent Component `yaml:"performance-profiles-component"` SchedulerComponent Component `yaml:"scheduler-component"` ScalingHorizon ScalingHorizon `yaml:"scaling-horizon"` PreferredAlgorithm string `yaml:"preferred-algorithm"` PolicySettings PolicySettings `yaml:"policy-settings"` PullingInterval int `yaml:"pulling-interval"` StorageInterval string `yaml:"storage-interval"` }
Struct that models the system configuration to derive the scaling policies
func ReadConfigFile ¶
func ReadConfigFile(configFile string) (SystemConfiguration, error)
Method that parses the configuration file into a struct type
Click to show internal directories.
Click to hide internal directories.