bloomutils

package
v1.6.2-0...-8a36637 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Uint32Range = Range[uint32]{Min: 0, Max: math.MaxUint32}
	Uint64Range = Range[uint64]{Min: 0, Max: math.MaxUint64}
)

Functions

func KeyspacesFromTokenRanges

func KeyspacesFromTokenRanges(tokenRanges ring.TokenRanges) []v1.FingerprintBounds

TODO(owen-d): use https://github.com/grafana/loki/pull/11975 after merge

func TokenRangesForInstance

func TokenRangesForInstance(id string, instances []ring.InstanceDesc) (ranges ring.TokenRanges, err error)

Types

type InstanceWithTokenRange

type InstanceWithTokenRange struct {
	Instance   ring.InstanceDesc
	TokenRange Range[uint32]
}

func (InstanceWithTokenRange) Cmp

type InstancesWithTokenRange

type InstancesWithTokenRange []InstanceWithTokenRange

func (InstancesWithTokenRange) Contains

func (i InstancesWithTokenRange) Contains(token uint32) bool

type Range

type Range[T constraints.Unsigned] struct {
	Min, Max T
}

func NewRange

func NewRange[T constraints.Unsigned](min, max T) Range[T]

func NewTokenRange

func NewTokenRange(min, max uint32) Range[uint32]

func (Range[T]) Cmp

func (r Range[T]) Cmp(t T) v1.BoundsCheck

func (Range[T]) Less

func (r Range[T]) Less(other Range[T]) bool

func (Range[T]) String

func (r Range[T]) String() string

Jump to

Keyboard shortcuts

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