config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppScaledObjectName added in v0.1.0

func AppScaledObjectName(httpso *v1alpha1.HTTPScaledObject) string

AppScaledObjectName returns the name of the ScaledObject that should be created alongside the given HTTPScaledObject.

Types

type Base added in v0.2.0

type Base struct {
	TargetPendingRequests int32 `envconfig:"TARGET_PENDING_REQUESTS" default:"100"`
	// The current namespace in which the operator is running.
	CurrentNamespace string `envconfig:"NAMESPACE" default:""`
	// The namespace the operator should watch. Leave blank to
	// tell the operator to watch all namespaces.
	WatchNamespace string `envconfig:"WATCH_NAMESPACE" default:""`
}

func NewBaseFromEnv added in v0.2.0

func NewBaseFromEnv() (*Base, error)

type ExternalScaler

type ExternalScaler struct {
	ServiceName string `envconfig:"EXTERNAL_SCALER_SERVICE_NAME" required:"true"`
	Port        int32  `envconfig:"EXTERNAL_SCALER_PORT" required:"true"`
}

ExternalScaler holds static configuration info for the external scaler

func NewExternalScalerFromEnv

func NewExternalScalerFromEnv() (*ExternalScaler, error)

NewExternalScalerFromEnv gets external scaler configuration values from environment variables and/or sensible defaults if values were missing. and returns the interceptor struct to match. Returns an error if required values were missing.

func (ExternalScaler) HostName added in v0.2.0

func (e ExternalScaler) HostName(namespace string) string

type Interceptor

type Interceptor struct {
	ServiceName string `envconfig:"INTERCEPTOR_SERVICE_NAME" required:"true"`
	ProxyPort   int32  `envconfig:"INTERCEPTOR_PROXY_PORT" required:"true"`
	AdminPort   int32  `envconfig:"INTERCEPTOR_ADMIN_PORT" required:"true"`
}

Interceptor holds static configuration info for the interceptor

func NewInterceptorFromEnv

func NewInterceptorFromEnv() (*Interceptor, error)

NewInterceptorFromEnv gets interceptor configuration values from environment variables and/or sensible defaults if values were missing. and returns the interceptor struct to match. Returns an error if required values were missing.

func (Interceptor) AdminPortString added in v0.2.0

func (i Interceptor) AdminPortString() string

AdminPortString returns i.AdminPort in string format, rather than as an int32.

Jump to

Keyboard shortcuts

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