![]() |
RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
#include <agent_config.h>
Classes | |
struct | AugmentationInfo |
struct | HourOfWeekFilter |
struct | RequestFilterCache |
struct | SegmentInfo |
Public Types | |
typedef std::function< void(const char *) | FilterStatFn ) |
Public Member Functions | |
void | parse (const std::string &jsonStr) |
void | fromJson (const Json::Value &json) |
Json::Value | toJson (bool includeCreatives=true) const |
bool | hasBlacklist () const |
void | addAugmentation (const std::string &name, Json::Value config=Json::Value()) |
void | addAugmentation (AugmentationInfo info) |
template<typename T > | |
const T * | getProviderData (const std::string &provider) const |
BiddableSpots | canBid (const ExchangeConnector *exchangeConnector, const std::vector< AdSpot > &imp, const std::string &exchange, const std::string &protocolVersion, const std::string &language, const Utf8String &location, uint64_t locationHash, ML::Lightweight_Hash< uint64_t, int > &locationCache) const |
BiddableSpots | isBiddableRequest (const ExchangeConnector *exchange, const BidRequest &request, AgentStats &stats, RequestFilterCache &cache, const FilterStatFn &doFilterStat=FilterStatFn()) const |
Static Public Member Functions | |
static AgentConfig | createFromJson (const Json::Value &json) |
Public Attributes | |
AccountKey | account |
Who to bill this to. | |
bool | test |
Can't make real bids. | |
std::string | roundRobinGroup |
int | roundRobinWeight |
float | bidProbability |
float | minTimeAvailableMs |
int | maxInFlight |
std::vector< std::string > | requiredIds |
IncludeExclude< DomainMatcher > | hostFilter |
IncludeExclude< CachedRegex < boost::regex, std::string > > | urlFilter |
IncludeExclude< CachedRegex < boost::regex, std::string > > | languageFilter |
IncludeExclude< CachedRegex < boost::u32regex, Utf8String > > | locationFilter |
std::map< std::string, SegmentInfo > | segments |
IncludeExclude< std::string > | exchangeFilter |
IncludeExclude < OpenRTB::AdPosition > | foldPositionFilter |
SegmentInfo | tagFilter |
HourOfWeekFilter | hourOfWeekFilter |
UserPartition | userPartition |
std::vector< Creative > | creatives |
BlacklistType | blacklistType |
BlacklistScope | blacklistScope |
double | blacklistTime |
BidControlType | bidControlType |
uint32_t | fixedBidCpmInMicros |
IncludeExclude< std::string > | augmentationFilter |
std::vector< AugmentationInfo > | augmentations |
Json::Value | providerConfig |
ML::Spinlock | lock |
lock for the provider data | |
std::map< std::string, std::shared_ptr< void > > | providerData |
List of provider-specific creative data. | |
SegmentList | visitChannels |
bool | includeUnmatchedVisits |
BidResultFormat | winFormat |
BidResultFormat | lossFormat |
BidResultFormat | errorFormat |
Describes the configuration state of an RTB agent. Passed through by a agent to the router to describe how the routes should be set up.
Definition at line 205 of file agent_config.h.
void RTBKIT::AgentConfig::addAugmentation | ( | const std::string & | name, |
Json::Value | config = Json::Value() |
||
) |
Add the given augmentation to the list of augmentations. This will fail if the given augmentation already exists in the list.
Definition at line 1030 of file agent_config.cc.
void RTBKIT::AgentConfig::addAugmentation | ( | AugmentationInfo | info | ) |
Add the given augmentation to the list of augmentations. This will fail if the given augmentation already exists in the list.
Definition at line 1042 of file agent_config.cc.
BiddableSpots RTBKIT::AgentConfig::canBid | ( | const ExchangeConnector * | exchangeConnector, |
const std::vector< AdSpot > & | imp, | ||
const std::string & | exchange, | ||
const std::string & | protocolVersion, | ||
const std::string & | language, | ||
const Utf8String & | location, | ||
uint64_t | locationHash, | ||
ML::Lightweight_Hash< uint64_t, int > & | locationCache | ||
) | const |
Returns a list of (adspot, [creatives]) pairs compatible with this agent.
Definition at line 779 of file agent_config.cc.
BiddableSpots RTBKIT::AgentConfig::isBiddableRequest | ( | const ExchangeConnector * | exchange, |
const BidRequest & | request, | ||
AgentStats & | stats, | ||
RequestFilterCache & | cache, | ||
const FilterStatFn & | doFilterStat = FilterStatFn() |
||
) | const |
Returns the biddable imp (see canBid) if the agent can bid on the given bid request.
Before the function returns false, doFilterStat will be called with the cause of the filtering and the appropriate member of AgentStats will be incremented.
Definition at line 818 of file agent_config.cc.
Do we include visits not matched to a conversion?
Definition at line 347 of file agent_config.h.
JSON value that is passed through with each bid.
Definition at line 321 of file agent_config.h.
List of channels for which we subscribe to post impression visit events.
Definition at line 344 of file agent_config.h.
Message formats
Definition at line 350 of file agent_config.h.