Documentation
¶
Overview ¶
Package urlrewrite resolves and applies the optional URL rewrite extension.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveProvider ¶
func ResolveProvider(ctx context.Context, provider exttransport.Provider) exttransport.URLRewriter
ResolveProvider resolves the URL rewriter from provider. Providers that do not implement URLRewriterProvider, and providers that return a nil rewriter, resolve to nil. Callers that have already selected a provider should use this function so related extension hooks use the same provider instance.
func Rewrite ¶
Rewrite applies the registered URL rewriter to rawURL, returning rawURL unchanged when no rewriter is registered. Rewriting is a synchronous in-process string mapping; the extension is trusted in-process code and owns the returned value, so URL-consuming call sites apply their existing parsing and transport behavior.
Types ¶
type RequestError ¶
RequestError exposes the effective, sanitized destination of a failed request. Transport produces it; diagnostic and error output consume it.