bucketer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultHashSeed = 1

DefaultHashSeed is the hash seed to use for murmurhash

Variables

This section is empty.

Functions

This section is empty.

Types

type ExperimentBucketer

type ExperimentBucketer interface {
	Bucket(bucketingID string, experiment entities.Experiment, group entities.Group) (entities.Variation, reasons.Reason, error)
}

ExperimentBucketer is used to bucket the user into a particular entity in the experiment's traffic alloc range

type MurmurhashBucketer

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

MurmurhashBucketer buckets the user using the mmh3 algorightm

func NewMurmurhashBucketer

func NewMurmurhashBucketer(hashSeed uint32) *MurmurhashBucketer

NewMurmurhashBucketer returns a new instance of the experiment bucketer

func (MurmurhashBucketer) Bucket

func (b MurmurhashBucketer) Bucket(bucketingID string, experiment entities.Experiment, group entities.Group) (entities.Variation, reasons.Reason, error)

Bucket buckets the user into the given experiment

Jump to

Keyboard shortcuts

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