logic

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForceContainerInstance added in v0.4.0

func ForceContainerInstance(projectContext entity.ProjectGlobal)

func GetContainersUsage added in v0.4.0

func GetContainersUsage(projectContext entity.ProjectGlobal, usages map[string]UsageApp)

func GetProjectMetrics added in v0.4.0

func GetProjectMetrics(projectContext entity.ProjectGlobal, usages map[string]UsageApp)

func RemoveUnscaleContainers added in v0.4.0

func RemoveUnscaleContainers(projectContext entity.ProjectGlobal, usages map[string]UsageApp)

func ScalingContainer added in v0.4.0

func ScalingContainer(projectContext entity.ProjectGlobal)

func ScalingInstance

func ScalingInstance(projectContext entity.ProjectGlobal)

func SetResources added in v0.4.0

func SetResources(projectContext entity.ProjectGlobal, usages map[string]UsageApp)

Types

type SizeProfile added in v0.4.0

type SizeProfile struct {
	Id  string
	Cpu float64
	Mem int32
}

func ListContainerSize added in v0.4.0

func ListContainerSize(projectContext entity.ProjectGlobal, name string) []SizeProfile

ListContainerSize retrieves the size profiles of containers in the project.

type UsageApp

type UsageApp struct {
	Name   string
	Values []UsageValue

	// Horizontal scaling
	InstanceUpdate bool
	InstanceOld    int
	InstanceNew    int

	// Vertical scaling
	IdProfileUpdate bool
	IdProfileOld    float64
	IdProfileNew    SizeProfile
}

type UsageValue

type UsageValue struct {
	Cpu float64
	Mem float64
}

Jump to

Keyboard shortcuts

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