functions

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: May 14, 2019 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FixedQueueSizeFunc

func FixedQueueSizeFunc(queueSize int) func(int) int

FixedQueueSizeFunc implements a fixed amount the estimated limit can grow while latencies remain low

func Log10RootFloatFunction

func Log10RootFloatFunction(baseline float64) func(estimatedLimit float64) float64

Log10RootFloatFunction is a specialized utility function used by limiters to calculate thresholds using log10 of the current limit. Here we pre-compute the log10 root of numbers up to 1000 (or more) because the log10 root operation can be slow.

func Log10RootFunction

func Log10RootFunction(baseline int) func(estimatedLimit int) int

Log10RootFunction is a specialized utility function used by limiters to calculate thresholds using log10 of the current limit. Here we pre-compute the log10 root of numbers up to 1000 (or more) because the log10 root operation can be slow.

func SqrtRootFunction

func SqrtRootFunction(baseline int) func(estimatedLimit int) int

SqrtRootFunction is a specialized utility function used by limiters to calculate thresholds using square root of the current limit. Here we pre-compute the square root of numbers up to 1000 (or more) because the square root operation can be slow.

Types

This section is empty.

Jump to

Keyboard shortcuts

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