Documentation
¶
Index ¶
- func HealthCheck(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func NewGetHandler(storage backends.Backend, metrics *metrics.Metrics, allowCustomKeys bool) func(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func NewIndexHandler(message string) func(http.ResponseWriter, *http.Request, httprouter.Params)
- func NewPutHandler(storage backends.Backend, metrics *metrics.Metrics, maxNumValues int, ...) func(http.ResponseWriter, *http.Request, httprouter.Params)
- func NewStatusEndpoint(response string) httprouter.Handle
- func NewVersionEndpoint(version, revision string) func(http.ResponseWriter, *http.Request, httprouter.Params)
- type GetHandler
- type PutHandler
- type PutResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HealthCheck ¶
func HealthCheck(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
HealthCheck end-point for prebid-cache
func NewGetHandler ¶
func NewGetHandler(storage backends.Backend, metrics *metrics.Metrics, allowCustomKeys bool) func(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
NewGetHandler returns the handle function for the "/cache" endpoint when it receives a GET request
func NewIndexHandler ¶
func NewIndexHandler(message string) func(http.ResponseWriter, *http.Request, httprouter.Params)
NewIndexHandler returns the default '/' route handle function
func NewPutHandler ¶
func NewPutHandler(storage backends.Backend, metrics *metrics.Metrics, maxNumValues int, allowKeys bool) func(http.ResponseWriter, *http.Request, httprouter.Params)
NewPutHandler returns the handle function for the "/cache" endpoint when it receives a POST request
func NewStatusEndpoint ¶
func NewStatusEndpoint(response string) httprouter.Handle
NewStatusEndpoint returns a handler which writes the given response when the app is ready to serve requests.
func NewVersionEndpoint ¶
func NewVersionEndpoint(version, revision string) func(http.ResponseWriter, *http.Request, httprouter.Params)
NewVersionEndpoint returns the latest git tag as the version and commit hash as the revision from which the binary was built
Types ¶
type GetHandler ¶
type GetHandler struct {
// contains filtered or unexported fields
}
GetHandler serves "GET /cache" requests.
type PutHandler ¶
type PutHandler struct {
// contains filtered or unexported fields
}
PutHandler serves "POST /cache" requests.
type PutResponse ¶
type PutResponse struct {
Responses []putResponseObject `json:"responses"`
}
PutResponse will be marshaled to be written into the http response