config

package
v0.1.23 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Copyright (c) Alex Ellis 2017. All rights reserved. Copyright (c) OpenFaaS Author(s) 2020. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BootstrapConfig

type BootstrapConfig struct {
	// HTTPProbe when set to true switches readiness and liveness probe to
	// access /_/health over HTTP instead of accessing /tmp/.lock.
	HTTPProbe bool

	// SetNonRootUser determines if the Function is deployed with a overridden
	// non-root user id.  Currently this is preconfigured to the uid 12000.
	SetNonRootUser bool

	// ReadinessProbeInitialDelaySeconds controls the value of
	// ReadinessProbeInitialDelaySeconds in the Function  ReadinessProbe
	ReadinessProbeInitialDelaySeconds int

	// ReadinessProbeTimeoutSeconds controls the value of
	// ReadinessProbeTimeoutSeconds in the Function  ReadinessProbe
	ReadinessProbeTimeoutSeconds int

	// ReadinessProbePeriodSeconds controls the value of
	// ReadinessProbePeriodSeconds in the Function  ReadinessProbe
	ReadinessProbePeriodSeconds int

	// LivenessProbeInitialDelaySeconds controls the value of
	// LivenessProbeInitialDelaySeconds in the Function  LivenessProbe
	LivenessProbeInitialDelaySeconds int

	// LivenessProbeTimeoutSeconds controls the value of
	// LivenessProbeTimeoutSeconds in the Function  LivenessProbe
	LivenessProbeTimeoutSeconds int

	// LivenessProbePeriodSeconds controls the value of
	// LivenessProbePeriodSeconds in the Function  LivenessProbe
	LivenessProbePeriodSeconds int

	// ImagePullPolicy controls the ImagePullPolicy set on the Function Deployment.
	ImagePullPolicy string

	// DefaultFunctionNamespace defines which namespace in which Functions are deployed.
	// Value is set via the function_namespace environment variable. If the
	// variable is not set, it is set to "default".
	DefaultFunctionNamespace string

	// ProfilesNamespace defines which namespace is used to look up available Profiles.
	// Value is set via the profiles_namespace environment variable. If the
	// variable is not set, then it falls back to DefaultFunctionNamespace.
	ProfilesNamespace string

	// FaaSConfig contains the configuration for the FaaSProvider
	FaaSConfig ftypes.FaaSConfig

	// ClusterRole determines whether the operator should have cluster wide access
	ClusterRole bool

	//custom replica policy based on funtion rate
	FunctionRate bool
}

BootstrapConfig contains the server configuration values as well as default Function configuration parameters that are passed to the function factory.

func (BootstrapConfig) Fprint

func (c BootstrapConfig) Fprint(verbose bool)

Fprint pretty-prints the config with the stdlib logger. One line per config value. When the verbose flag is set to false, it prints the same output as prior to the 0.12.0 release.

type ReadConfig

type ReadConfig struct {
}

ReadConfig constitutes config from env variables

func (ReadConfig) Read

func (ReadConfig) Read(hasEnv ftypes.HasEnv) (BootstrapConfig, error)

Read fetches config from environmental variables.

Jump to

Keyboard shortcuts

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