check / check (push) Failing after 3m22s
The GeoJS lookup and its cache move from internal/lookup to internal/geojs, which imports no other package of this repository. waf hands it functions to count requests, report failures and count lookups that went without an answer; waf keeps the log line, the source_failure alert and the metrics. The caller now passes its wait to each lookup. waf passes SWW_WAF_ASN_AND_COUNTRY_LOOKUP_TIMEOUT_MS. A request to GeoJS has its own fixed limit of 10 seconds, and only passing it or an error from GeoJS is a failure. An answer that comes after the caller stopped waiting is kept. internal/lookup keeps the lookup database and returns geojs.Answer. Model: opus-5-5
10 lines
222 B
Go
10 lines
222 B
Go
package geojs
|
|
|
|
import "net/http"
|
|
|
|
// SetTransport has g's requests to GeoJS go through transport instead of
|
|
// the network.
|
|
func (g *GeoJS) SetTransport(transport http.RoundTripper) {
|
|
g.httpClient.Transport = transport
|
|
}
|