Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpFetcher ¶
type HttpFetcher struct { Endpoint string // contains filtered or unexported fields }
func NewFetcher ¶
func NewFetcher(client *http.Client, endpoint string) *HttpFetcher
NewFetcher returns a Fetcher which uses the Client to pull data from the endpoint.
This file expects the endpoint to satisfy the following API:
GET {endpoint}?request-ids=["req1","req2"]&imp-ids=["imp1","imp2","imp3"]
This endpoint should return a payload like:
{ "requests": { "req1": { ... stored data for req1 ... }, "req2": { ... stored data for req2 ... }, }, "imps": { "imp1": { ... stored data for imp1 ... }, "imp2": { ... stored data for imp2 ... }, "imp3": null // If imp3 is not found } }
func (*HttpFetcher) FetchRequests ¶
func (fetcher *HttpFetcher) FetchRequests(ctx context.Context, requestIDs []string, impIDs []string) (requestData map[string]json.RawMessage, impData map[string]json.RawMessage, errs []error)
Click to show internal directories.
Click to hide internal directories.