(proxy *api.Proxy)
| 75 | } |
| 76 | |
| 77 | func FromServiceProxy(proxy *api.Proxy) *Proxy { |
| 78 | if proxy == nil { |
| 79 | return nil |
| 80 | } |
| 81 | |
| 82 | return &Proxy{ |
| 83 | Path: proxy.Path, |
| 84 | Timeout: proxy.Timeout, |
| 85 | Retry: proxy.Retry, |
| 86 | Headers: utils.SliceToSlice(proxy.Headers, func(header *api.Header) *Header { |
| 87 | return &Header{ |
| 88 | Key: header.Key, |
| 89 | Value: header.Value, |
| 90 | Opt: header.Opt, |
| 91 | OptType: header.OptType, |
| 92 | } |
| 93 | }), |
| 94 | Extends: proxy.Extends, |
| 95 | Plugins: proxy.Plugins, |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | type Proxy struct { |
| 100 | Path string `json:"path"` |
nothing calls this directly
no outgoing calls
no test coverage detected