fix(pipeline): harden upstream resilience and production shutdown

DoH через DoWithRetry; CDN preview через UpstreamHTTPDo; частичный fail CDN (EVOBGP_CDN_PARTIAL_OK); безопасный доступ к Job.Meta; drain jobs при SIGTERM; ValidateProductionEnforce при EVOBGP_PRODUCTION=1.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Denozordec
2026-07-31 12:11:52 +07:00
co-authored by Cursor
parent 1e04e91dd8
commit 53ce80c9ff
14 changed files with 228 additions and 16 deletions
+5
View File
@@ -8,6 +8,11 @@ import (
"evobgp/internal/httpclient"
)
// UpstreamHTTPDo performs an outbound GET/POST with circuit breaker + retries (CDN, previews).
func UpstreamHTTPDo(ctx context.Context, hc *http.Client, req *http.Request) (*http.Response, error) {
return upstreamHTTPDo(ctx, hc, req)
}
func upstreamHTTPDo(ctx context.Context, hc *http.Client, req *http.Request) (*http.Response, error) {
if hc == nil {
hc = httpclient.New(httpclient.DefaultTimeout)