MCPcopy Index your code
hub / github.com/zalando/skipper / setRequestURLForDynamicBackend

Function setRequestURLForDynamicBackend

proxy/proxy.go:619–638  ·  view source on GitHub ↗
(u *url.URL, stateBag map[string]interface{})

Source from the content-addressed store, hash-verified

617}
618
619func setRequestURLForDynamicBackend(u *url.URL, stateBag map[string]interface{}) {
620 dbu, ok := stateBag[filters.DynamicBackendURLKey].(string)
621 if ok && dbu != "" {
622 bu, err := url.ParseRequestURI(dbu)
623 if err == nil {
624 u.Host = bu.Host
625 u.Scheme = bu.Scheme
626 }
627 } else {
628 host, ok := stateBag[filters.DynamicBackendHostKey].(string)
629 if ok && host != "" {
630 u.Host = host
631 }
632
633 scheme, ok := stateBag[filters.DynamicBackendSchemeKey].(string)
634 if ok && scheme != "" {
635 u.Scheme = scheme
636 }
637 }
638}
639
640func (p *Proxy) selectEndpoint(ctx *context) *routing.LBEndpoint {
641 rt := ctx.route

Callers 2

mapRequestMethod · 0.85

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…