Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an outbound HTTP resource: a *http.Client instrumented with otel tracing and Prometheus metrics, bound to one base URL. Catalog field: *Client (Configurable); the real http.Client is built in Inject once HTTPClientMetrics resolves — there is no separate Start: constructing a *http.Client opens no connection (unlike a listening server or a grpc.ClientConn's resolver/balancer goroutines), so there is nothing for a Start step to do.
func (*Client) BuildConfig ¶
func (*Client) BuildConfig() (app.Materializer, error)
BuildConfig returns the config spec for materialize.
func (*Client) Close ¶
Close releases idle connections. Calls instrumentedTransport directly rather than c.httpClient.CloseIdleConnections() — that would check only the outer otelhttp.Transport, which never forwards the call inward (see instrumentedTransport.CloseIdleConnections).
func (*Client) HTTPClient ¶
HTTPClient returns the instrumented client (nil before Inject).
func (*Client) Inject ¶
Inject receives HTTPClientMetrics from SDI and builds the instrumented http.Client: otel tracing outermost, wrapping the Prometheus-recording transport (mirrors otelgrpc.NewClientHandler + prometheus interceptors in client-grpc, for HTTP instead of gRPC).
func (*Client) Label ¶
Label returns the configured resource label. No nil guard: the standard app flow (fill/materialize/sdi.Resolve) never hands a nil *Client to a consumer's Inject — only Build's output is ever registered — so a nil receiver here only happens by constructing *Client outside app.Run, which this package makes no promises about.
type HTTPClientMetrics ¶
type HTTPClientMetrics struct {
// contains filtered or unexported fields
}
HTTPClientMetrics is a singleton pool resource: shared Prometheus collectors for all client-http clients. RegisterMetrics matches ops metrics duck-typing (github.com/omcrgnt/ops/metrics.MetricsContributor; no ops import here).
func (*HTTPClientMetrics) RegisterMetrics ¶
func (m *HTTPClientMetrics) RegisterMetrics(reg *prometheus.Registry) error