Documentation ¶
Index ¶
- func ConvertTimeMappingDataIndex(startTime *time.Time, inputTime *time.Time, timeStep int, startHour int64, ...) int64
- func GenerateRandomFloat64(minvalue *float64, maxvalue *float64, precision int) float64
- func ReadCSV(file string) (map[string][]string, error)
- type Config
- type Containers
- type ConvNodeMetaData
- type ConvPodMetadata
- func (c *ConvPodMetadata) EnableHPA(enabled bool)
- func (c *ConvPodMetadata) EnableVPA(enabled bool)
- func (c *ConvPodMetadata) GetPod() *Datahub.Pod
- func (c *ConvPodMetadata) SetContainer(container *Datahub.Container)
- func (c *ConvPodMetadata) SetContainerName(containerName string)
- func (c *ConvPodMetadata) SetCreatedTime(startedTime time.Time)
- func (c *ConvPodMetadata) SetNamesapce(namespace string)
- func (c *ConvPodMetadata) SetNodeName(nodeName string)
- func (c *ConvPodMetadata) SetPod(pod *Datahub.Pod)
- func (c *ConvPodMetadata) SetPodName(podName string)
- type EmulatorGlobal
- type SubContainer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateRandomFloat64 ¶
Types ¶
type Config ¶
type Config struct { Containers *Containers Container map[string]SubContainer Datahub *datahub.Config `mapstructure:"datahub"` Global *EmulatorGlobal `mapstructure:"global"` Log *log.Config `mapstructure:"log"` }
type Containers ¶
type Containers struct { ContainersNamespace string `mapstructure:"container_namespace"` ContainerCountVPA int `mapstructure:"container_vpa_count"` ContainerCountHPA int `mapstructure:"container_hpa_count"` ContainerPrefixName string `mapstructure:"container_prefix_name"` ContainerCPUCsvFilepath string `mapstructure:"container_cpu_csv_filepath"` ContainerMemoryCsvFilepath string `mapstructure:"container_memory_csv_filepath"` ContainerPulledStartHour string `mapstructure:"container_pulled_start_hour"` ContainerCPURandom bool `mapstructure:"container_cpu_random"` ContainerMemoryRandom bool `mapstructure:"container_memory_random"` ContainerCPURandomRange string `mapstructure:"container_cpu_random_range"` ContainerMemoryRandomRange string `mapstructure:"container_memory_random_range"` ContainerDataStep int `mapstructure:"container_data_step"` }
type ConvNodeMetaData ¶
func NewNodeMetadata ¶
func NewNodeMetadata(rawData []byte) *ConvNodeMetaData
type ConvPodMetadata ¶
func NewPodMetadata ¶
func NewPodMetadata(rawData []byte) *ConvPodMetadata
func (*ConvPodMetadata) EnableHPA ¶
func (c *ConvPodMetadata) EnableHPA(enabled bool)
func (*ConvPodMetadata) EnableVPA ¶
func (c *ConvPodMetadata) EnableVPA(enabled bool)
func (*ConvPodMetadata) GetPod ¶
func (c *ConvPodMetadata) GetPod() *Datahub.Pod
func (*ConvPodMetadata) SetContainer ¶
func (c *ConvPodMetadata) SetContainer(container *Datahub.Container)
func (*ConvPodMetadata) SetContainerName ¶
func (c *ConvPodMetadata) SetContainerName(containerName string)
func (*ConvPodMetadata) SetCreatedTime ¶
func (c *ConvPodMetadata) SetCreatedTime(startedTime time.Time)
func (*ConvPodMetadata) SetNamesapce ¶
func (c *ConvPodMetadata) SetNamesapce(namespace string)
func (*ConvPodMetadata) SetNodeName ¶
func (c *ConvPodMetadata) SetNodeName(nodeName string)
func (*ConvPodMetadata) SetPod ¶
func (c *ConvPodMetadata) SetPod(pod *Datahub.Pod)
func (*ConvPodMetadata) SetPodName ¶
func (c *ConvPodMetadata) SetPodName(podName string)
type EmulatorGlobal ¶
type EmulatorGlobal struct { EmulatorNamespace string `mapstructure:"emulator_namespace"` EmulatorListenAddress string `mapstructure:"emulator_listen_address"` EmulatorWebPath string `mapstructure:"emulator_web_path"` EmulatorLabelName string `mapstructure:"emulator_label_name"` EmulatorLabelValue string `mapstructure:"emulator_label_value"` EmulatorNodeName string `mapstructure:"emulator_node_name"` EmulatorNodeResourceCPUCores int64 `mapstructure:"emulator_node_resource_cpu_cores"` EmulatorNodeCPUUsageRange string `mapstructure:"emulator_node_resource_cpu_usage_range"` EmulatorNodeResourceMemoryBytes int64 `mapstructure:"emulator_node_resource_memory_bytes"` EmulatorNodeMemoryBytesRange string `mapstructure:"emulator_node_resource_memory_usage_range"` EmulatorNodeResourceNetwotkMegabitsPerSecond int64 `mapstructure:"emulator_node_netwotk_megabits_per_second"` EmulatorNodeMetadata string `mapstructure:"emulator_node_metadata_template"` EmulatorContainerMetadata string `mapstructure:"emulator_container_metadata_template"` EmulatorContainerIgnoreCreation bool `mapstructure:"emulator_container_ignore_creation"` EmulatorPrometheusScrapSeconds int64 `mapstructure:"emulator_performance_scrap_seconds"` }
type SubContainer ¶
type SubContainer struct { ContainersNamespace string `mapstructure:"container_namespace"` ContainerPrefixName string `mapstructure:"container_prefix_name"` ContainerCPUCsvFilepath string `mapstructure:"container_cpu_csv_filepath"` ContainerMemoryCsvFilepath string `mapstructure:"container_memory_csv_filepath"` ContainerPulledStartHour string `mapstructure:"container_pulled_start_hour"` ContainerCPURandom bool `mapstructure:"container_cpu_random"` ContainerMemoryRandom bool `mapstructure:"container_memory_random"` ContainerCPURandomRange string `mapstructure:"container_cpu_random_range"` ContainerMemoryRandomRange string `mapstructure:"container_memory_random_range"` ContainerDataStep int64 `mapstructure:"container_data_step"` }
Click to show internal directories.
Click to hide internal directories.