cluster

package
v0.0.0-...-60ce6a2 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotFoundError   = errgo.New("not found")
	ValidationError = errgo.New("validation")
)

Functions

func Decode

func Decode(obj ast.Node, excludeKeys []string, defaultValues map[string]interface{}, data interface{}) error

Decode from object to data structure using `mapstructure`

func ParseStringList

func ParseStringList(o *ast.ObjectList, context string) ([]string, error)

Types

type Cluster

type Cluster struct {
	// Name within the domain e.g. alpha-c32
	Stack string `mapstructure:"stack"`
	// Domain name e.g. pulcy.com
	Domain string `mapstructure:"domain"`
	// SSH tunnel needed to reach the cluster (optional)
	Tunnel string `mapstructure:"tunnel,omitempty"`
	// Size of the cluster (in instances==machines)
	InstanceCount int `mapstructure:"instance-count,omitempty"`
	// Default network type
	Network string `mapstructure:"network,omitempty"`

	// Quark options
	QuarkOptions QuarkOptions
}

Cluster contains all variables describing a cluster (deployment target)

func New

func New(domain, stack string, instanceCount int) Cluster

New returns a new cluster for testing purposes.

func ParseClusterFromFile

func ParseClusterFromFile(path string) (*Cluster, error)

ParseClusterFromFile reads a cluster from file

func (Cluster) ResolveProfile

func (c Cluster) ResolveProfile(name string) (map[string]interface{}, error)

ResolveProfile looks for a given profile. If found it merges all values into the returned value set. If not found it returns an error.

type Profile

type Profile struct {
	Name   string `mapstructure:"-"`
	Values map[string]interface{}
}

Profile contains options that are specific to one profile. settings in a profile overwrite settings in QuarkOptions.

type QuarkOptions

type QuarkOptions struct {
	DefaultValues map[string]interface{}
	Profiles      []Profile
}

QuarkOptions contains options that are specific to quark.

Jump to

Keyboard shortcuts

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