Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config interface {
GetApps(userID string) (tasks []*demand.Task, maxContainers int, err error)
}
Config is an interface for retrieving task config - could be hardcoded, from the server, from a file etc
type EnvVarConfig ¶
type EnvVarConfig struct {
EnvVarValue string
}
EnvVarConfig is used when we retrieve config from an environment variable.
func NewEnvVarConfig ¶
func NewEnvVarConfig(EnvVarValue string) *EnvVarConfig
NewEnvVarConfig gets a new EnvVarConfig.
type HardcodedConfig ¶
type HardcodedConfig struct{}
HardcodedConfig is used for testing
func NewHardcodedConfig ¶
func NewHardcodedConfig() *HardcodedConfig
NewHardcodedConfig gets a new hardcoded config
type KubeLabelConfig ¶
KubeLabelConfig is used when we retrieve get image config from the Microscaling server and then get label config from MicroBadger APIs
func NewKubeLabelConfig ¶
func NewKubeLabelConfig(APIAddress string, KubeConfig string, KubeNamespace string) *KubeLabelConfig
NewKubeLabelConfig gets a new KubeLabelConfig
func (*KubeLabelConfig) GetApps ¶
func (kl *KubeLabelConfig) GetApps(userID string) (tasks []*demand.Task, maxContainers int, err error)
GetApps retrieves task config from the server using the API, gets the Docker image from the Kubernetes deployments API and then gets scaling parameters from labels using MicroBadger
type LabelConfig ¶
type LabelConfig struct {
APIAddress string
}
LabelConfig is used when we retrieve get image config from the Microscaling server and then get label config from MicroBadger APIs
func NewLabelConfig ¶
func NewLabelConfig(APIAddress string) *LabelConfig
NewLabelConfig gets a new LabelConfig
type ServerConfig ¶
type ServerConfig struct {
APIAddress string
}
ServerConfig is used when we retrieve config over the API from the server
func NewServerConfig ¶
func NewServerConfig(APIAddress string) *ServerConfig
NewServerConfig gets a new ServerConfig