Documentation
¶
Index ¶
- func KnownConfigKeys(schema environschema.Fields) set.Strings
- type Config
- type ConfigAttributes
- func (c ConfigAttributes) Get(attrName string, defaultValue interface{}) interface{}
- func (c ConfigAttributes) GetBool(attrName string, defaultValue bool) bool
- func (c ConfigAttributes) GetInt(attrName string, defaultValue int) int
- func (c ConfigAttributes) GetString(attrName string, defaultValue string) string
- func (c ConfigAttributes) GetStringMap(attrName string, defaultValue map[string]string) (map[string]string, error)
- type GoalState
- type GoalStateStatus
- type UnitsGoalState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KnownConfigKeys ¶
KnownConfigKeys returns the valid application config keys.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config encapsulates config for an application.
func NewConfig ¶
func NewConfig(attrs map[string]interface{}, schema environschema.Fields, defaults schema.Defaults) (*Config, error)
NewConfig returns a new config instance with the given attributes and allowing for the extra provider attributes.
func (*Config) Attributes ¶
func (c *Config) Attributes() ConfigAttributes
Attributes returns all the config attributes.
type ConfigAttributes ¶
type ConfigAttributes map[string]interface{}
ConfigAttributes is the config for an application.
func (ConfigAttributes) Get ¶
func (c ConfigAttributes) Get(attrName string, defaultValue interface{}) interface{}
Get gets the specified attribute.
func (ConfigAttributes) GetBool ¶
func (c ConfigAttributes) GetBool(attrName string, defaultValue bool) bool
GetInt gets the specified bool attribute.
func (ConfigAttributes) GetInt ¶
func (c ConfigAttributes) GetInt(attrName string, defaultValue int) int
GetInt gets the specified int attribute.
func (ConfigAttributes) GetString ¶
func (c ConfigAttributes) GetString(attrName string, defaultValue string) string
GetString gets the specified string attribute.
func (ConfigAttributes) GetStringMap ¶
func (c ConfigAttributes) GetStringMap(attrName string, defaultValue map[string]string) (map[string]string, error)
GetStringMap gets the specified map attribute as map[string]string.
type GoalState ¶
type GoalState struct { Units UnitsGoalState Relations map[string]UnitsGoalState }
GoalState is responsible to organize the Units and Relations with a specific unit, and transmit this information from the api to the worker.
type GoalStateStatus ¶
GoalStateStatus keeps the status and timestamp of a unit.
type UnitsGoalState ¶
type UnitsGoalState map[string]GoalStateStatus
UnitsGoalState keeps the collection of units and their GoalStateStatus