config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 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

Types

type AppInfo

type AppInfo struct {
	Name                 string
	Namespace            string
	InterceptorConfig    Interceptor
	ExternalScalerConfig ExternalScaler
}

AppInfo contains configuration for the Interceptor and External Scaler, and holds data about the name and namespace of the scale target.

type Base added in v0.2.0

type Base struct {
	TargetPendingRequests int32  `envconfig:"TARGET_PENDING_REQUESTS" default:"100"`
	Namespace             string `envconfig:"NAMESPACE" required:"true"`
}

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