Documentation
¶
Index ¶
- Constants
- type AttributeManager
- func (m *AttributeManager) GetAttribute(name taxonomy.Attribute, instance string) *taxonomy.InfrastructureElement
- func (m *AttributeManager) GetInstanceType(name taxonomy.Attribute) *taxonomy.InstanceType
- func (m *AttributeManager) GetOptions() monitor.FileMonitorOptions
- func (m *AttributeManager) OnError(err error)
- func (m *AttributeManager) OnNotify()
Constants ¶
const InfrastructureInfo string = "infrastructure.json"
A json file containing the infrastructure information
const RegoPolicyDirectory string = "/tmp/adminconfig/"
A directory containing rego files that define admin config policies
const ValidationPath string = "/tmp/taxonomy/infraattributes.json#/definitions/Infrastructure"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttributeManager ¶
type AttributeManager struct { Log zerolog.Logger Infrastructure infraattributes.Infrastructure Mux *sync.RWMutex }
AttributeManager provides access to infrastructure attributes
func NewAttributeManager ¶
func NewAttributeManager() (*AttributeManager, error)
func (*AttributeManager) GetAttribute ¶
func (m *AttributeManager) GetAttribute(name taxonomy.Attribute, instance string) *taxonomy.InfrastructureElement
GetAttribute returns an infrastructure attribute based on the attribute and instance names
func (*AttributeManager) GetInstanceType ¶
func (m *AttributeManager) GetInstanceType(name taxonomy.Attribute) *taxonomy.InstanceType
GetInstanceType returns the instance type associated with the attribute TODO: validate that there is only one instance type associated with the given attribute
func (*AttributeManager) GetOptions ¶
func (m *AttributeManager) GetOptions() monitor.FileMonitorOptions
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