config

package
v0.275.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: Apache-2.0 Imports: 20 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateStoredRequests

func CreateStoredRequests(cfg *config.StoredRequests, metricsEngine metrics.MetricsEngine, client *http.Client, router *httprouter.Router, provider db_provider.DbProvider) (fetcher stored_requests.AllFetcher, shutdown func())

CreateStoredRequests returns three things:

1. A Fetcher which can be used to get Stored Requests 2. 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.

func NewStoredRequests

func NewStoredRequests(cfg *config.Configuration, metricsEngine metrics.MetricsEngine, client *http.Client, router *httprouter.Router) (shutdown func(),
	fetcher stored_requests.Fetcher,
	ampFetcher stored_requests.Fetcher,
	accountsFetcher stored_requests.AccountFetcher,
	categoriesFetcher stored_requests.CategoryFetcher,
	videoFetcher stored_requests.Fetcher,
	storedRespFetcher stored_requests.Fetcher)

NewStoredRequests returns:

1. A function which should be called on shutdown for graceful cleanups. 2. A Fetcher which can be used to get Stored Requests for /openrtb2/auction 3. A Fetcher which can be used to get Stored Requests for /openrtb2/amp 4. A Fetcher which can be used to get Account data 5. A Fetcher which can be used to get Category Mapping data 6. A Fetcher which can be used to get Stored Requests for /openrtb2/video

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