config

package
v0.0.0-...-9049715 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Interval time.Duration
	Services []ConfigService
}

Parsed information from an YAML file Or service labels

type ConfigService

type ConfigService struct {
	Name        string
	StackName   string
	Enabled     bool
	MaxReplicas uint16

	Thresholds ConfigServiceThreshold
}

type ConfigServiceThreshold

type ConfigServiceThreshold struct {
	Cpu    ServiceThreshold
	Memory ServiceThreshold
}

Threshold definitions

type ServiceThreshold

type ServiceThreshold struct {

	// Percent indicates the percent (up to 1)
	// how to scale the resource.
	// E.g. for CPUs that should scale when it reaches 20% usage
	// the value here will be 0.2
	Percent float32

	// default: `average`
	Metric string

	// How long to watch for usage changes before scaling up
	// Mininum value is `10s`
	ScaleUpDuration string

	// How long to watch for usage changes before scaling down.
	// Mininum value is `10s`
	ScaleDownDuration string
}

Jump to

Keyboard shortcuts

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