generator

package
v1.0.797 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigGenerator

type ConfigGenerator struct {
	Namespaces, Nodes                                                  ConfigTypeRequirements
	PodsPerReplicaSet, ReplicaSetPerDeployment, DeploymentPerNamespace ConfigTypeRequirements
	Tags                                                               map[string]string
	Generated                                                          Generated
	// contains filtered or unexported fields
}

func (*ConfigGenerator) Destroy

func (generator *ConfigGenerator) Destroy(db *gorm.DB) error

func (*ConfigGenerator) GenerateConfigItem

func (generator *ConfigGenerator) GenerateConfigItem(configType, status string, deletedAt *time.Time, parent *models.ConfigItem, req ConfigTypeRequirements) models.ConfigItem

func (*ConfigGenerator) GenerateKubernetes

func (generator *ConfigGenerator) GenerateKubernetes()
func (generator *ConfigGenerator) Link(parent, child models.ConfigItem)

func (*ConfigGenerator) Save

func (generator *ConfigGenerator) Save(db *gorm.DB) error

type ConfigTypeHealthRequirements

type ConfigTypeHealthRequirements struct {
	HealthyPercentage   int
	UnhealthyPercentage int
	WarningPercentage   int
	UnknownPercentage   int
}

func (*ConfigTypeHealthRequirements) IsEmpty

func (t *ConfigTypeHealthRequirements) IsEmpty() bool

func (*ConfigTypeHealthRequirements) IsValid

func (t *ConfigTypeHealthRequirements) IsValid() bool

func (*ConfigTypeHealthRequirements) SetDefaults

func (t *ConfigTypeHealthRequirements) SetDefaults()

type ConfigTypeRequirements

type ConfigTypeRequirements struct {
	Status ConfigTypeHealthRequirements

	Count   int
	Deleted int

	NumChangesPerConfig  int
	NumInsightsPerConfig int
}

type Generated

type Generated struct {
	Configs       []models.ConfigItem
	Changes       []models.ConfigChange
	Analysis      []models.ConfigAnalysis
	Relationships []models.ConfigRelationship
}

func (*Generated) ConfigByTypes

func (t *Generated) ConfigByTypes(configType ...string) []models.ConfigItem

func (*Generated) Total

func (t *Generated) Total() int

Jump to

Keyboard shortcuts

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