utils

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 2 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExponentialBucketTimeRange

func ExponentialBucketTimeRange(start, end time.Duration, buckets int) []float64

ExponentialBucketTimeRange creates a bucket set for a histogram that has exponentially increasing intervals between the values, e.g. 0, 0.5, 1, 2, 4, 8, ... Fixed to guarantee exactly 'buckets' number of buckets and produce clean floating-point values.

func LinearBucketRange

func LinearBucketRange(start, end int64, buckets int) []float64

LinearBucketRange creates a bucket set for a histogram that has uniform intervals between the values, e.g. 0, 1, 2, 3, 4, ...

func LinearBucketTimeRange

func LinearBucketTimeRange(start, end time.Duration, buckets int) []float64

LinearBucketTimeRange creates a bucket set for a histogram that has uniform intervals between the values, e.g. 0, 1, 2, 3, 4, ...

Types

This section is empty.

Directories

Path Synopsis
Package collections re-exports a subset of the iterators, maps, sets and slices subpackages under shorter names, for callers that only need a handful of these functions and don't want to import each subpackage separately.
Package collections re-exports a subset of the iterators, maps, sets and slices subpackages under shorter names, for callers that only need a handful of these functions and don't want to import each subpackage separately.
Package deferred holds a value that is supplied after the service owning it has been constructed, and keeps readers from seeing it before it exists.
Package deferred holds a value that is supplied after the service owning it has been constructed, and keeps readers from seeing it before it exists.
Package lazy provides value holders that defer producing their value until it is first requested, and memoize the result (including an error) for every later request.
Package lazy provides value holders that defer producing their value until it is first requested, and memoize the result (including an error) for every later request.

Jump to

Keyboard shortcuts

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