config

package
v0.0.0-...-97a8816 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

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.

Jump to

Keyboard shortcuts

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