Documentation ¶
Index ¶
Constants ¶
View Source
const ( FailHeader = "x-istio-backend-fail" FailBody = "Bad request from backend." )
If HTTP header has non empty FailHeader, HTTP server will fail the request with 400 with FailBody in the response body.
Variables ¶
View Source
var ( // TARGET_OUT environment variable // nolint: revive, stylecheck TARGET_OUT Variable = "TARGET_OUT" // LOCAL_OUT environment variable // nolint: revive, stylecheck LOCAL_OUT Variable = "LOCAL_OUT" // REPO_ROOT environment variable // nolint: revive, stylecheck REPO_ROOT Variable = "REPO_ROOT" // HUB is the Docker hub to be used for images. // nolint: revive, stylecheck HUB Variable = "HUB" // TAG is the Docker tag to be used for images. // nolint: revive, stylecheck TAG Variable = "TAG" // PULL_POLICY is the image pull policy to use when rendering templates. // nolint: revive, stylecheck PULL_POLICY Variable = "PULL_POLICY" // KUBECONFIG is the list of Kubernetes configuration files. If configuration files are specified on // the command-line, that takes precedence. // nolint: revive, stylecheck KUBECONFIG Variable = "KUBECONFIG" // IstioSrc is the location of istio source ($TOP/src/istio.io/istio IstioSrc = REPO_ROOT.ValueOrDefaultFunc(getDefaultIstioSrc) // IstioOut is the location of the output directory ($TOP/out) IstioOut = verifyFile(TARGET_OUT, TARGET_OUT.ValueOrDefaultFunc(getDefaultIstioOut)) // LocalOut is the location of the output directory for the OS we are running in, // not necessarily the OS we are building for LocalOut = verifyFile(LOCAL_OUT, LOCAL_OUT.ValueOrDefaultFunc(getDefaultIstioOut)) // OtelCollectorInstallFilePath is the OpenTelemetry installation file. OtelCollectorInstallFilePath = path.Join(IstioSrc, getInstallationFile("opentelemetry/opentelemetry-collector.yaml")) // StackdriverInstallFilePath is the stackdriver installation file. StackdriverInstallFilePath = path.Join(IstioSrc, getInstallationFile("stackdriver/stackdriver.yaml")) // GCEMetadataServerInstallFilePath is the GCE Metadata Server installation file. GCEMetadataServerInstallFilePath = path.Join(IstioSrc, getInstallationFile("gcemetadata/gce_metadata_server.yaml")) // ContainerRegistryServerInstallFilePath is the fake container registry installation file. ContainerRegistryServerInstallFilePath = path.Join(IstioSrc, getInstallationFile("containerregistry/container_registry_server.yaml")) )
View Source
var ( // Root folder of this project // This relies on the fact this file is 3 levels up from the root; if this changes, adjust the path below Root = filepath.Join(filepath.Dir(b), "../../..") )
Functions ¶
func CheckFileExists ¶
func ReadProxySHA ¶
func WaitForHTTPServer ¶
WaitForHTTPServer waits for a HTTP server
Types ¶
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
HTTPServer stores data for a HTTP server.
func NewHTTPServer ¶
func NewHTTPServer(port uint16) (*HTTPServer, error)
NewHTTPServer creates a new HTTP server.
func (*HTTPServer) LastRequestHeaders ¶
func (s *HTTPServer) LastRequestHeaders() http.Header
LastRequestHeaders returns the headers from the last request and clears the value
type Variable ¶
type Variable string
Variable is a wrapper for an environment variable.
func (Variable) ValueOrDefault ¶
ValueOrDefault returns the value of the environment variable if it is non-empty. Otherwise returns the value provided.
func (Variable) ValueOrDefaultFunc ¶
ValueOrDefaultFunc returns the value of the environment variable if it is non-empty. Otherwise returns the value function provided.
Click to show internal directories.
Click to hide internal directories.