infrastructure

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const InfrastructureInfo string = "infrastructure.json"

A json file containing the infrastructure information

View Source
const NormalizationFactor = 100

Variables

View Source
var RegoPolicyDirectory = environment.GetDataDir() + "/adminconfig/"

RegoPolicyDirectory is a directory containing rego files that define admin config policies

View Source
var ValidationPath = environment.GetDataDir() + "/taxonomy/infraattributes.json#/definitions/Infrastructure"

Functions

This section is empty.

Types

type AttributeManager

type AttributeManager struct {
	Log zerolog.Logger
	// attribute specific values
	Attributes []taxonomy.InfrastructureElement
	// metrics
	Metrics MetricsDictionary
	Mux     *sync.RWMutex
}

AttributeManager provides access to infrastructure attributes

func NewAttributeManager

func NewAttributeManager() (*AttributeManager, error)

func (*AttributeManager) GetAttrFromArguments added in v1.0.0

func (m *AttributeManager) GetAttrFromArguments(name, arg1, arg2 string) *taxonomy.InfrastructureElement

Returns an infrastructure attribute based on the attribute name and two arguments to match

func (*AttributeManager) GetAttribute

func (m *AttributeManager) GetAttribute(name, instance string) *taxonomy.InfrastructureElement

GetAttributeValue returns the value of an infrastructure attribute based on the attribute and instance names

func (*AttributeManager) GetAttributeValue added in v1.0.0

func (m *AttributeManager) GetAttributeValue(name, instance string) (string, bool)

GetAttributeValue returns the value of an infrastructure attribute based on the attribute and instance names

func (*AttributeManager) GetInstanceTypes added in v1.0.0

func (m *AttributeManager) GetInstanceTypes(name string) []taxonomy.InstanceType

GetInstanceType returns instance types associated with the attribute

func (*AttributeManager) GetNormAttrValFromArgs added in v1.0.0

func (m *AttributeManager) GetNormAttrValFromArgs(name, arg1, arg2 string) (string, error)

// returns the normalized-to-scale value of an infrastructure attribute based on the attribute and two arguments to match

func (*AttributeManager) GetNormalizedAttributeValue added in v1.0.0

func (m *AttributeManager) GetNormalizedAttributeValue(name, instance string) (string, error)

returns the normalized-to-scale value of an infrastructure attribute based on the attribute and instance names

func (*AttributeManager) GetOptions

Options for file monitor including the monitored directory and the relevant file extension

func (*AttributeManager) OnError

func (m *AttributeManager) OnError(err error)

notification from the file system monitor about an error while getting access to the infrastructure file

func (*AttributeManager) OnNotify

func (m *AttributeManager) OnNotify()

notification from the file monitor on change in the infrastructure json file

type MetricsDictionary added in v1.0.0

type MetricsDictionary map[string]taxonomy.InfrastructureMetrics

Jump to

Keyboard shortcuts

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