Documentation
¶
Index ¶
- Constants
- func BidderToPrebidSChains(sChains []*openrtb_ext.ExtRequestPrebidSChain) (map[string]*openrtb_ext.ExtRequestPrebidSChainSChain, error)
- func BuildAdapters(client *http.Client, cfg *config.Configuration, infos config.BidderInfos, ...) (map[openrtb_ext.BidderName]adaptedBidder, []error)
- func GetActiveBidders(infos config.BidderInfos) map[string]openrtb_ext.BidderName
- func GetDisabledBiddersErrorMessages(infos config.BidderInfos) map[string]string
- func GetPriceBucket(cpm float64, config openrtb_ext.PriceGranularity) string
- func GetValidBidders(aliases map[string]string) map[string]struct{}
- func IsDebugOverrideEnabled(debugHeader, configOverrideToken string) bool
- type AuctionRequest
- type BidIDGenerator
- type BidderRequest
- type ContextKey
- type DebugData
- type DebugLog
- type Exchange
- type IdFetcher
- type ImpExtInfo
Constants ¶
View Source
const DebugContextKey = ContextKey("debugInfo")
View Source
const (
DebugOverrideHeader string = "x-pbs-debug-override"
)
View Source
const MaxKeyLength = 20
Variables ¶
This section is empty.
Functions ¶
func BidderToPrebidSChains ¶
func BidderToPrebidSChains(sChains []*openrtb_ext.ExtRequestPrebidSChain) (map[string]*openrtb_ext.ExtRequestPrebidSChainSChain, error)
func BuildAdapters ¶
func BuildAdapters(client *http.Client, cfg *config.Configuration, infos config.BidderInfos, me metrics.MetricsEngine) (map[openrtb_ext.BidderName]adaptedBidder, []error)
func GetActiveBidders ¶
func GetActiveBidders(infos config.BidderInfos) map[string]openrtb_ext.BidderName
GetActiveBidders returns a map of all active bidder names.
func GetDisabledBiddersErrorMessages ¶
func GetDisabledBiddersErrorMessages(infos config.BidderInfos) map[string]string
GetDisabledBiddersErrorMessages returns a map of error messages for disabled bidders.
func GetPriceBucket ¶
func GetPriceBucket(cpm float64, config openrtb_ext.PriceGranularity) string
GetPriceBucket is the externally facing function for computing CPM buckets
func GetValidBidders ¶
func IsDebugOverrideEnabled ¶ added in v0.163.0
Types ¶
type AuctionRequest ¶
type AuctionRequest struct { BidRequest *openrtb2.BidRequest Account config.Account UserSyncs IdFetcher RequestType metrics.RequestType StartTime time.Time Warnings []error GlobalPrivacyControlHeader string ImpExtInfoMap map[string]ImpExtInfo // LegacyLabels is included here for temporary compatability with cleanOpenRTBRequests // in HoldAuction until we get to factoring it away. Do not use for anything new. LegacyLabels metrics.Labels }
AuctionRequest holds the bid request for the auction and all other information needed to process that request
type BidIDGenerator ¶
type BidderRequest ¶
type BidderRequest struct { BidRequest *openrtb2.BidRequest BidderName openrtb_ext.BidderName BidderCoreName openrtb_ext.BidderName BidderLabels metrics.AdapterLabels }
BidderRequest holds the bidder specific request and all other information needed to process that bidder request.
type ContextKey ¶
type ContextKey string
type DebugLog ¶
type DebugLog struct { Enabled bool CacheType prebid_cache_client.PayloadType Data DebugData TTL int64 CacheKey string CacheString string Regexp *regexp.Regexp DebugOverride bool //little optimization, it stores value of debugLog.Enabled || debugLog.DebugOverride DebugEnabledOrOverridden bool }
func (*DebugLog) BuildCacheString ¶
func (d *DebugLog) BuildCacheString()
func (*DebugLog) PutDebugLogError ¶
type Exchange ¶
type Exchange interface { // HoldAuction executes an OpenRTB v2.5 Auction. HoldAuction(ctx context.Context, r AuctionRequest, debugLog *DebugLog) (*openrtb2.BidResponse, error) }
Exchange runs Auctions. Implementations must be threadsafe, and will be shared across many goroutines.
func NewExchange ¶
func NewExchange(adapters map[openrtb_ext.BidderName]adaptedBidder, cache prebid_cache_client.Client, cfg *config.Configuration, syncersByBidder map[string]usersync.Syncer, metricsEngine metrics.MetricsEngine, infos config.BidderInfos, gDPR gdpr.Permissions, currencyConverter *currency.RateConverter, categoriesFetcher stored_requests.CategoryFetcher) Exchange
type IdFetcher ¶
type IdFetcher interface { GetUID(key string) (uid string, exists bool, notExpired bool) HasAnyLiveSyncs() bool }
IdFetcher can find the user's ID for a specific Bidder.
type ImpExtInfo ¶ added in v0.172.0
Click to show internal directories.
Click to hide internal directories.