RateWindow

fun RateWindow(name: String, published: Int, period: Duration, configure: RateWindow.Builder.() -> Unit = {}): RateWindow(source)

Builds a RateWindow. RateWindow("day", 3_000, 1.days) { margin = 100; hard = true }.

Stable Core.

Return

the window.

Parameters

name

the window's name; not blank.

published

the provider's documented calls per period; at least 1.

period

the window's length; positive, finite, a whole number of milliseconds.

configure

assigns margin and hard.

Throws

if a value is outside its range; the message names the property and never a value.