config

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2020 License: MIT Imports: 8 Imported by: 0

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 State

type State struct {
	Targets task.Targets      `json:"targets"`
	Env     map[string]string `json:"env"`
}

State represents a desired system state

func ConfigFromDirectory

func ConfigFromDirectory(dir, hostname string) (state State, err error)

ConfigFromDirectory searches a directory for configuration files and constructs a desired state from the declarations.

Jump to

Keyboard shortcuts

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