floors

package
v2.32.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SiteDomain          string = "siteDomain"
	PubDomain           string = "pubDomain"
	Domain              string = "domain"
	Bundle              string = "bundle"
	Channel             string = "channel"
	MediaType           string = "mediaType"
	Size                string = "size"
	GptSlot             string = "gptSlot"
	AdUnitCode          string = "adUnitCode"
	Country             string = "country"
	DeviceType          string = "deviceType"
	Tablet              string = "tablet"
	Desktop             string = "desktop"
	Phone               string = "phone"
	BannerMedia         string = "banner"
	VideoMedia          string = "video"
	VideoOutstreamMedia string = "video-outstream"
	AudioMedia          string = "audio"
	NativeMedia         string = "native"
)

Variables

This section is empty.

Functions

func Enforce

Enforce does floors enforcement for bids from all bidders based on floors provided in request, account level floors config

func EnrichWithPriceFloors

func EnrichWithPriceFloors(bidRequestWrapper *openrtb_ext.RequestWrapper, account config.Account, conversions currency.Conversions, priceFloorFetcher FloorFetcher) []error

EnrichWithPriceFloors checks for floors enabled in account and request and selects floors data from dynamic fetched if present else selects floors data from req.ext.prebid.floors and update request with selected floors details

Types

type FetchQueue added in v2.1.0

type FetchQueue []*fetchInfo

func (FetchQueue) Len added in v2.1.0

func (fq FetchQueue) Len() int

func (FetchQueue) Less added in v2.1.0

func (fq FetchQueue) Less(i, j int) bool

func (*FetchQueue) Pop added in v2.1.0

func (fq *FetchQueue) Pop() interface{}

func (*FetchQueue) Push added in v2.1.0

func (fq *FetchQueue) Push(element interface{})

func (FetchQueue) Swap added in v2.1.0

func (fq FetchQueue) Swap(i, j int)

func (*FetchQueue) Top added in v2.1.0

func (fq *FetchQueue) Top() *fetchInfo

type FloorFetcher added in v2.1.0

type FloorFetcher interface {
	Fetch(configs config.AccountPriceFloors) (*openrtb_ext.PriceFloorRules, string)
	Stop()
}

type Price

type Price struct {
	FloorMin    float64
	FloorMinCur string
}

type PriceFloorFetcher added in v2.1.0

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

func NewPriceFloorFetcher added in v2.1.0

func NewPriceFloorFetcher(config config.PriceFloors, httpClient *http.Client, metricEngine metrics.MetricsEngine) *PriceFloorFetcher

func (*PriceFloorFetcher) Fetch added in v2.1.0

func (*PriceFloorFetcher) Fetcher added in v2.1.0

func (f *PriceFloorFetcher) Fetcher()

func (*PriceFloorFetcher) Get added in v2.1.0

func (f *PriceFloorFetcher) Get(key string) (json.RawMessage, bool)

func (*PriceFloorFetcher) SetWithExpiry added in v2.1.0

func (f *PriceFloorFetcher) SetWithExpiry(key string, value json.RawMessage, cacheExpiry int)

func (*PriceFloorFetcher) Stop added in v2.1.0

func (f *PriceFloorFetcher) Stop()

Stop terminates price floor fetcher

type WorkerPool added in v2.1.0

type WorkerPool interface {
	TrySubmit(task func()) bool
	Stop()
}

Jump to

Keyboard shortcuts

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