env

package
v0.0.0-...-1a56975 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// GOPATH environment variable
	// nolint: golint
	GOPATH Variable = "GOPATH"

	// TOP environment variable
	// nolint: golint
	TOP Variable = "TOP"

	// ISTIO_GO environment variable
	// nolint: golint
	ISTIO_GO Variable = "ISTIO_GO"

	// ISTIO_BIN environment variable
	// nolint: golint
	ISTIO_BIN Variable = "ISTIO_BIN"

	// ISTIO_OUT environment variable
	// nolint: golint
	ISTIO_OUT Variable = "ISTIO_OUT"

	// HUB is the Docker hub to be used for images.
	// nolint: golint
	HUB Variable = "HUB"

	// TAG is the Docker tag to be used for images.
	// nolint: golint
	TAG Variable = "TAG"

	// PULL_POLICY is the image pull policy to use when rendering templates.
	// nolint: golint
	PULL_POLICY Variable = "PULL_POLICY"

	// ISTIO_TEST_KUBE_CONFIG is the Kubernetes configuration file to use for testing. If a configuration file
	// is specified on the command-line, that takes precedence.
	// nolint: golint
	ISTIO_TEST_KUBE_CONFIG Variable = "ISTIO_TEST_KUBE_CONFIG"

	// IstioTop has the top of the istio tree, matches the env variable from make.
	IstioTop = TOP.ValueOrDefaultFunc(getDefaultIstioTop)

	// IstioSrc is the location if istio source ($TOP/src/istio.io/istio
	IstioSrc = path.Join(IstioTop, "src/istio.io/istio")

	// IstioBin is the location of the binary output directory
	IstioBin = verifyFile(ISTIO_BIN, ISTIO_BIN.ValueOrDefaultFunc(getDefaultIstioBin))

	// IstioOut is the location of the output directory ($TOP/out)
	IstioOut = verifyFile(ISTIO_OUT, ISTIO_OUT.ValueOrDefaultFunc(getDefaultIstioOut))

	// IstioRoot is the root of the Istio source repository.
	IstioRoot = path.Join(GOPATH.Value(), "/src/istio.io/istio")

	// ChartsDir is the Kubernetes Helm chart directory in the repository
	ChartsDir = path.Join(IstioRoot, "install/kubernetes/helm")

	// IstioChartDir is the Kubernetes Helm chart directory in the repository
	IstioChartDir = path.Join(ChartsDir, "istio")

	CrdsFilesDir = path.Join(ChartsDir, "istio-init/files")

	// BookInfoRoot is the root folder for the bookinfo samples
	BookInfoRoot = path.Join(IstioRoot, "samples/bookinfo")

	// BookInfoKube is the book info folder that contains Yaml deployment files.
	BookInfoKube = path.Join(BookInfoRoot, "platform/kube")
)

Functions

This section is empty.

Types

type Variable

type Variable string

Variable is a wrapper for an environment variable.

func (Variable) Name

func (e Variable) Name() string

Name of the environment variable.

func (Variable) Value

func (e Variable) Value() string

Value of the environment variable.

func (Variable) ValueOrDefault

func (e Variable) ValueOrDefault(defaultValue string) string

ValueOrDefault returns the value of the environment variable if it is non-empty. Otherwise returns the value provided.

func (Variable) ValueOrDefaultFunc

func (e Variable) ValueOrDefaultFunc(defaultValueFunc func() string) string

ValueOrDefaultFunc returns the value of the environment variable if it is non-empty. Otherwise returns the value function provided.

Jump to

Keyboard shortcuts

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