Documentation
¶
Overview ¶
Package httptrack implements HTTP observation policy without telemetry state.
Index ¶
- func InternalDestination(host string) bool
- func MatchHost(host string, patterns []string) bool
- func Method(method string) string
- func NewBody(original io.ReadCloser, finish func(error)) io.ReadCloser
- func NormalizeHost(host string) string
- func Port(request *http.Request) int
- func ProtocolVersion(protocol string) string
- func RemoteIP(request *http.Request) (netip.Addr, bool)
- func Route(request *http.Request) string
- func Scheme(request *http.Request) string
- func SpanName(method, route string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InternalDestination ¶
InternalDestination classifies a normalized host without DNS resolution. Private literals, single-label names and explicit internal suffixes qualify.
func MatchHost ¶
MatchHost matches normalized hosts to lowercased exact or wildcard patterns. A wildcard requires a subdomain; it never admits the bare domain.
func NewBody ¶
func NewBody(original io.ReadCloser, finish func(error)) io.ReadCloser
NewBody observes completion without changing read results or close errors. Close errors are returned to the caller, not reported as read failures.
func NormalizeHost ¶
NormalizeHost lowercases a host and drops one trailing root dot.
func ProtocolVersion ¶
ProtocolVersion removes an HTTP/ prefix when present.
func RemoteIP ¶
RemoteIP parses only the peer address, never caller-controlled forwarding headers. IPv4-mapped addresses are unmapped and zones are removed.
Types ¶
This section is empty.