Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStoredRequests ¶
func NewStoredRequests(cfg *config.StoredRequests, client *http.Client, router *httprouter.Router) (fetcher stored_requests.Fetcher, ampFetcher stored_requests.Fetcher, db *sql.DB, shutdown func())
NewStoredRequests returns four things:
1. A Fetcher which can be used to get Stored Requests for /openrtb2/auction 2. A Fetcher which can be used to get Stored Requests for /openrtb2/amp 3. A DB connection, if one was created. This may be nil. 4. A function which should be called on shutdown for graceful cleanups.
If any errors occur, the program will exit with an error message. It probably means you have a bad config or networking issue.
As a side-effect, it will add some endpoints to the router if the config calls for it. In the future we should look for ways to simplify this so that it's not doing two things.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.