MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / ToProxyHeaders

Function ToProxyHeaders

module/upstream/dto/input.go:19–29  ·  view source on GitHub ↗
(p []*ProxyHeader)

Source from the content-addressed store, hash-verified

17}
18
19func ToProxyHeaders(p []*ProxyHeader) []*upstream.ProxyHeader {
20 proxyHeaders := make([]*upstream.ProxyHeader, 0, len(p))
21 for _, header := range p {
22 proxyHeaders = append(proxyHeaders, &upstream.ProxyHeader{
23 Key: header.Key,
24 Value: header.Value,
25 OptType: header.OptType,
26 })
27 }
28 return proxyHeaders
29}
30
31func ConvertUpstream(u *Upstream) *upstream.Config {
32 nodes := make([]*upstream.NodeConfig, 0, len(u.Nodes))

Callers 1

ConvertUpstreamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected