staged

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateStagedRate

func CalculateStagedRate(
	jitterArg float64,
	frequency time.Duration,
	stg string,
	distributionTypeArg string,
	startTime *time.Time,
) (*api.Rates, error)

func Rate added in v2.1.0

func Rate() api.Builder

Types

type RateCalculator added in v2.1.0

type RateCalculator struct {
	// contains filtered or unexported fields
}

func NewRateCalculator added in v2.1.0

func NewRateCalculator(stages []Stage, start *time.Time) *RateCalculator

func (*RateCalculator) MaxDuration added in v2.1.0

func (s *RateCalculator) MaxDuration() time.Duration

func (*RateCalculator) Rate added in v2.1.0

func (s *RateCalculator) Rate(now time.Time) int

type Stage added in v2.1.0

type Stage struct {
	StartTarget int
	EndTarget   int
	Duration    time.Duration
}

func ParseStages added in v2.1.0

func ParseStages(value string) ([]Stage, error)

Jump to

Keyboard shortcuts

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