config

package
v6.0.5+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Databases is a map of database types Compose supports to the versions of
	// those databases that Compose supports
	Databases map[string][]string
	// Clusters is a map of Cluster names to IDs to validate that the cluster
	// a user specifies exists
	Clusters map[string]string
	// Datacenters is a map of names to validate that the datacenter slugs a user
	// specifies exist
	Datacenters map[string]struct{}
	// CXN is a connection object for retrieving existing deployment information
	CXN *connection.Connection
)

Functions

func BuildClusterFilter

func BuildClusterFilter(clusters []string)

BuildClusterFilter accepts a list of cluster names to filter configuration data. Only deployments to clusters in the filter are returned by ReadFiles()

func BuildDatacenterFilter

func BuildDatacenterFilter(datacenters []string)

BuildDatacenterFilter accepts a list of datacenter slugs to filter configuration data by. Only deployments to datacenters in the filter are returned by ReadFiles()

Types

type Config

type Config struct {
	// Runners is a slice of all the deployments to be provisioned
	// and any that need to be looked up.
	//
	// The deployments to be provisioned in this slice have been
	// filtered by cluster and/or datacenter if those filters were
	// set.
	Runners []runner.Runner

	// EndpointMap is a list of mappings to perform to translate
	// the connection strings returned by Compose.io. This is most
	// useful with Enterprise accounts using clusters that expose
	// public endpoints, but the Compose API only returns the
	// private ones.
	EndpointMap map[string]string
	// contains filtered or unexported fields
}

Config returns parsed configuration objects to be consumed by pachelbel for provisioning

func ReadFiles

func ReadFiles(args []string) (*Config, error)

ReadFiles works through a list of arguments to parse configuration data into deployment object. Both configuration files and directories of configuration files are valid arguments, but directories are not read recursively, only immediate child files are parsed.

type TeamV1

type TeamV1 struct {
	ID   string `json:"id"`
	Role string `json:"role"`
}

TeamV1 is the structure corresponding to version 1 of pachelbel's team_roles configuration YAML

Jump to

Keyboard shortcuts

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