MCPcopy
hub / github.com/kubernetes/client-go / RoundTrip

Method RoundTrip

rest/plugin_test.go:276–291  ·  view source on GitHub ↗
(req *http.Request)

Source from the content-addressed store, hash-verified

274}
275
276func (w *wrapTransportPersist) RoundTrip(req *http.Request) (*http.Response, error) {
277 roundTrips := 0
278 if rtVal, ok := w.config["roundTrips"]; ok {
279 var err error
280 roundTrips, err = strconv.Atoi(rtVal)
281 if err != nil {
282 return nil, err
283 }
284 }
285 roundTrips++
286 w.config["roundTrips"] = fmt.Sprintf("%d", roundTrips)
287 if err := w.persister.Persist(w.config); err != nil {
288 return nil, err
289 }
290 return w.rt.RoundTrip(req)
291}
292
293type pluginPersist struct {
294 config map[string]string

Callers

nothing calls this directly

Calls 2

PersistMethod · 0.65
RoundTripMethod · 0.45

Tested by

no test coverage detected