experiments

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IndexStrategy

type IndexStrategy interface {
	GetIndex() uint
}

IndexStrategy interface

func NewCounterStrategy

func NewCounterStrategy() IndexStrategy

NewCounterStrategy interface

func NewRandomStrategy

func NewRandomStrategy() IndexStrategy

NewRandomStrategy interface

type SourceWrapper

type SourceWrapper interface {
	// Next returns source interface according to strategy
	Next() adtype.Source

	// SetTimeout for sourcer
	SetTimeout(timeout time.Duration)
}

SourceWrapper advertisement accessor interface

func NewRandomSourceWrapper

func NewRandomSourceWrapper(sources ...adtype.Source) SourceWrapper

NewRandomSourceWrapper with roundrobin strategy

func NewSimpleWrapper

func NewSimpleWrapper(source adtype.Source) SourceWrapper

NewSimpleWrapper object

func NewSourceWrapper

func NewSourceWrapper(sources ...adtype.Source) SourceWrapper

NewSourceWrapper with roundrobin strategy

Jump to

Keyboard shortcuts

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