gh-ost/go/base
Tim Vaillancourt 0918bab29b
Add context/timeout to HTTP throttle check (#1131)
* Add context/timeout to HTTP throttle check

* Dont run `.GetThrottleHTTPInterval()` on every loop

* Update help message

* Var rename

* 2022

* Add timeout flag

* Add unix/tcp server commands, use ParseInt() for string->int64

* Var rename

* Re-check http timeout on every loop iteration

* Remove stale comment

* Make throttle interval idempotent

* var rename

* Usage grammar

* Make http timeout idempotent too

* Parse time.Duration once

* Move timeout to NewThrottler

* Help update

* Set User-Agent header

* Re-add newline

Co-authored-by: dm-2 <45519614+dm-2@users.noreply.github.com>
2022-07-06 23:56:07 +02:00
..
context_test.go Add golangci-lint CI action, fix gosimple, govet + unused lint errors (#1127) 2022-05-31 21:23:39 +02:00
context.go Add context/timeout to HTTP throttle check (#1131) 2022-07-06 23:56:07 +02:00
default_logger.go Add golangci-lint CI action, fix gosimple, govet + unused lint errors (#1127) 2022-05-31 21:23:39 +02:00
load_map_test.go Add go mod (#935) 2021-06-24 20:19:37 +02:00
load_map.go Throttling & critical load 2016-06-18 21:12:07 +02:00
utils_test.go Add go mod (#935) 2021-06-24 20:19:37 +02:00
utils.go Add golangci-lint CI action, fix gosimple, govet + unused lint errors (#1127) 2022-05-31 21:23:39 +02:00