Documentation
¶
Overview ¶
Package useragent sets the vMCP User-Agent on requests vMCP sends to its backends, so backend proxies can attribute those requests to vMCP instead of seeing Go's default Go-http-client agent.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RoundTripper ¶
type RoundTripper struct {
// contains filtered or unexported fields
}
RoundTripper sets the vMCP User-Agent on requests that carry none.
A User-Agent already on the request is kept. Place this stage inside (closer to the wire than) the header-forward stage so a User-Agent an operator forwards through passthroughHeaders or headerForward reaches the backend unchanged.
func NewRoundTripper ¶
func NewRoundTripper(base http.RoundTripper) *RoundTripper
NewRoundTripper wraps base with a stage that sets the vMCP User-Agent.
func (*RoundTripper) CloseIdleConnections ¶
func (t *RoundTripper) CloseIdleConnections()
CloseIdleConnections forwards to the wrapped RoundTripper so it reaches the concrete *http.Transport at the bottom of the chain.