floors

package
v2.10.0-ow Latest Latest
Warning

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

Go to latest
Published: Mar 12, 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

func RequestHasFloors

func RequestHasFloors(bidRequest *openrtb2.BidRequest) bool

Types

type FetchQueue

type FetchQueue []*fetchInfo

func (FetchQueue) Len

func (fq FetchQueue) Len() int

func (FetchQueue) Less

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

func (*FetchQueue) Pop

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

func (*FetchQueue) Push

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

func (FetchQueue) Swap

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

func (*FetchQueue) Top

func (fq *FetchQueue) Top() *fetchInfo

type FloorFetcher

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

type Price

type Price struct {
	FloorMin    float64
	FloorMinCur string
}

type PriceFloorFetcher

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

func NewPriceFloorFetcher

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

func (*PriceFloorFetcher) Fetch

func (*PriceFloorFetcher) Fetcher

func (f *PriceFloorFetcher) Fetcher()

func (*PriceFloorFetcher) Get

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

func (*PriceFloorFetcher) SetWithExpiry

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

func (*PriceFloorFetcher) Stop

func (f *PriceFloorFetcher) Stop()

Stop terminates price floor fetcher

type WorkerPool

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