feat(httpapi): harden control plane and speed up prefix refresh
Очередь job получила lease и fencing, телеметрия и прогресс deploy сохраняются, ревизия пишет manifest входов. Обновление префиксов не переписывает неизменённый снимок, большие наборы идут через COPY, а устаревшая ревизия не попадает в deploy. Бандл ноды кэшируется, prune и постановка job больше не держат горячий путь. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
924f111e48
commit
f8e0520817
197 files changed
+18655
-1416
No files matched your search
@@ -0,0 +1,35 @@
|
||||
package pipeline
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"evobgp/internal/httpclient"
|
||||
)
|
||||
|
||||
// pipelineTransport owns two reusable pools. Ordinary requests retain the
|
||||
// explicitly configured DoH/RIPE policy; CDN entry points select the guarded pool.
|
||||
type pipelineTransport struct {
|
||||
general http.RoundTripper
|
||||
cdn http.RoundTripper
|
||||
}
|
||||
|
||||
func (t *pipelineTransport) RoundTrip(r *http.Request) (*http.Response, error) {
|
||||
return t.general.RoundTrip(r)
|
||||
}
|
||||
|
||||
func (t *pipelineTransport) CloseIdleConnections() {
|
||||
for _, transport := range []http.RoundTripper{t.general, t.cdn} {
|
||||
if closer, ok := transport.(interface{ CloseIdleConnections() }); ok {
|
||||
closer.CloseIdleConnections()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// NewPipelineHTTPClient preserves configured DoH/RIPE access while giving CDN
|
||||
// fetches a separate reusable guarded transport without an unbounded client cache.
|
||||
func NewPipelineHTTPClient() *http.Client {
|
||||
client := httpclient.New(httpclient.DefaultTimeout)
|
||||
cdn := NewCDNHTTPClient()
|
||||
client.Transport = &pipelineTransport{general: client.Transport, cdn: cdn.Transport}
|
||||
return client
|
||||
}
|
||||
Reference in new issue
Block a user