prebid_cache_client

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cacheable

type Cacheable struct {
	Type       PayloadType     `json:"type,omitempty"`
	Data       json.RawMessage `json:"value,omitempty"`
	TTLSeconds int64           `json:"ttlseconds,omitempty"`
	Key        string          `json:"key,omitempty"`

	BidID     string `json:"bidid,omitempty"`     // this is "/vtrack" specific
	Bidder    string `json:"bidder,omitempty"`    // this is "/vtrack" specific
	Timestamp int64  `json:"timestamp,omitempty"` // this is "/vtrack" specific
}

type Client

type Client interface {
	// PutJson stores JSON values for the given openrtb2.Bids in the cache. Null values will be
	//
	// The returned string slice will always have the same number of elements as the values argument. If a
	// value could not be saved, the element will be an empty string. Implementations are responsible for
	// logging any relevant errors to the app logs
	PutJson(ctx context.Context, values []Cacheable) ([]string, []error)

	// GetExtCacheData gets the scheme, host, and path of the externally accessible cache url.
	GetExtCacheData() (scheme string, host string, path string)
}

Client stores values in Prebid Cache. For more info, see https://github.com/prebid/prebid-cache

func NewClient

func NewClient(httpClient *http.Client, conf *config.Cache, extCache *config.ExternalCache, metrics metrics.MetricsEngine) Client

type PayloadType

type PayloadType string
const (
	TypeJSON PayloadType = "json"
	TypeXML  PayloadType = "xml"
)

Jump to

Keyboard shortcuts

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