config

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: UPL-1.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PsrWorkerType specifies a worker type
	PsrWorkerType = "PSR_WORKER_TYPE"

	// PsrDuration specified the duration of the test using a duration string ("4m or 2h")
	// By default, the worker runs until the pod terminates
	PsrDuration = "PSR_DURATION"

	// PsrLoopSleep specified the sleep duration between loops
	// of work actions using a duration string ("4m or 2h")
	// For example, delay 1 second between logging
	// By default, the worker does not delay
	PsrLoopSleep = "PSR_LOOP_SLEEP"

	// PsrNumLoops specifies the number of loops
	// of work actions.  The default is -1 (forever)
	// By default, the worker iterates forever
	PsrNumLoops = "PSR_NUM_ITERATIONS"

	// PsrWorkerThreadCount specifies the number of worker threads to run.
	// By default, there is one thread per worker
	PsrWorkerThreadCount = "PSR_WORKER_THREAD_COUNT"

	// PsrWorkerNamespace is the namespace of the PSR release
	PsrWorkerNamespace = "NAMESPACE"

	// PsrWorkerReleaseName is the name of the PSR release
	PsrWorkerReleaseName = "RELEASE_NAME"

	// PsrWorkerTypeMetricsName is the metrics label key for the PSR worker type
	PsrWorkerTypeMetricsName = "psr_worker_type"
)

Define common worker configuration params

View Source
const (
	WorkerTypeExample       = "example"
	WorkerTypeOpsWriteLogs  = "ops-writelogs"
	WorkerTypeOpsGetLogs    = "ops-getlogs"
	WorkerTypeOpsPostLogs   = "ops-postlogs"
	WorkerTypeOpsScale      = "ops-scale"
	WorkerTypeOpsRestart    = "ops-restart"
	WorkerTypeHTTPGet       = "http-get"
	WorkerTypeReceiveAlerts = "prom-alerts"
	WorkerTypeWlsScale      = "wls-scale"
)

Define worker types

View Source
const (
	UnlimitedWorkerLoops    = -1
	UnlimitedWorkerDuration = -1 * time.Second
)

Variables

View Source
var PsrEnv = osenv.NewEnv()

Functions

This section is empty.

Types

type CommonConfig

type CommonConfig struct {
	WorkerType        string
	PsrDuration       time.Duration
	LoopSleepNanos    time.Duration
	NumLoops          int64
	WorkerThreadCount int
	Namespace         string
	ReleaseName       string
}

func GetCommonConfig

func GetCommonConfig(log vzlog.VerrazzanoLogger) (CommonConfig, error)

GetCommonConfig loads the common config from env vars

Jump to

Keyboard shortcuts

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