MCPcopy
hub / github.com/caddyserver/caddy / GetDialInfo

Function GetDialInfo

modules/caddyhttp/reverseproxy/hosts.go:299–302  ·  view source on GitHub ↗

GetDialInfo gets the upstream dialing info out of the context, and returns true if there was a valid value; false otherwise.

(ctx context.Context)

Source from the content-addressed store, hash-verified

297// GetDialInfo gets the upstream dialing info out of the context,
298// and returns true if there was a valid value; false otherwise.
299func GetDialInfo(ctx context.Context) (DialInfo, bool) {
300 dialInfo, ok := caddyhttp.GetVar(ctx, dialInfoVarKey).(DialInfo)
301 return dialInfo, ok
302}
303
304// hosts is the global repository for hosts that are
305// currently in use by active configuration(s). This

Callers 2

RoundTripMethod · 0.92
NewTransportMethod · 0.85

Calls 1

GetVarFunction · 0.92

Tested by

no test coverage detected