juju: github.com/juju/juju/core/application Index | Files

package application

import "github.com/juju/juju/core/application"


Package Files

config.go goal-state.go

func KnownConfigKeys Uses

func KnownConfigKeys(schema environschema.Fields) set.Strings

KnownConfigKeys returns the valid application config keys.

type Config Uses

type Config struct {
    // contains filtered or unexported fields

Config encapsulates config for an application.

func NewConfig Uses

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 Uses

func (c *Config) Attributes() ConfigAttributes

Attributes returns all the config attributes.

func (*Config) Validate Uses

func (c *Config) Validate() error

Validate returns an error if the config is not valid.

type ConfigAttributes Uses

type ConfigAttributes map[string]interface{}

ConfigAttributes is the config for an application.

func (ConfigAttributes) Get Uses

func (c ConfigAttributes) Get(attrName string, defaultValue interface{}) interface{}

Get gets the specified attribute.

func (ConfigAttributes) GetBool Uses

func (c ConfigAttributes) GetBool(attrName string, defaultValue bool) bool

GetInt gets the specified bool attribute.

func (ConfigAttributes) GetInt Uses

func (c ConfigAttributes) GetInt(attrName string, defaultValue int) int

GetInt gets the specified int attribute.

func (ConfigAttributes) GetString Uses

func (c ConfigAttributes) GetString(attrName string, defaultValue string) string

GetString gets the specified string attribute.

func (ConfigAttributes) GetStringMap Uses

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 Uses

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 Uses

type GoalStateStatus struct {
    Status string
    Since  *time.Time

GoalStateStatus keeps the status and timestamp of a unit.

type UnitsGoalState Uses

type UnitsGoalState map[string]GoalStateStatus

UnitsGoalState keeps the collection of units and their GoalStateStatus

Package application imports 6 packages (graph) and is imported by 57 packages. Updated 2019-05-11. Refresh now. Tools for package owners.