Documentation
¶
Overview ¶
Package config defines a configuration engine based on JavaScript. A configuration is built from a set of JavaScript source files and executed to generate a state object, which is provided to components such as the reconfigurer for resolving state changes. JavaScript is used so certain common expressions can be re-used, or targets can be conditionally resolved based on input variables such as the machine's hostname.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthMethod ¶ added in v1.4.0
type AuthMethod struct {
Name string `json:"name"` // name of the auth method
Path string `json:"path"` // path within the secret store
UserKey string `json:"user_key"` // key for username
PassKey string `json:"pass_key"` // key for password
}
AuthMethod represents a method of authentication for a target
type State ¶
type State struct {
Targets task.Targets `json:"targets"`
AuthMethods []AuthMethod `json:"auths"`
Env map[string]string `json:"env"`
}
State represents a desired system state
func ConfigFromDirectory ¶
ConfigFromDirectory searches a directory for configuration files and constructs a desired state from the declarations.