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

Method Prefix

rest/request.go:148–154  ·  view source on GitHub ↗

Prefix adds segments to the relative beginning to the request path. These items will be placed before the optional Namespace, Resource, or Name sections. Setting AbsPath will clear any previously set Prefix segments

(segments ...string)

Source from the content-addressed store, hash-verified

146// items will be placed before the optional Namespace, Resource, or Name sections.
147// Setting AbsPath will clear any previously set Prefix segments
148func (r *Request) Prefix(segments ...string) *Request {
149 if r.err != nil {
150 return r
151 }
152 r.pathPrefix = path.Join(r.pathPrefix, path.Join(segments...))
153 return r
154}
155
156// Suffix appends segments to the end of the path. These items will be placed after the prefix and optional
157// Namespace, Resource, or Name sections.

Callers 15

TestDoRequestSuccessFunction · 0.80
TestDoRequestCreatedFunction · 0.80
TestDoRequestNotCreatedFunction · 0.80
TestBadRequestFunction · 0.80
TestRequestURIFunction · 0.80
TestURLTemplateFunction · 0.80
TestDoRequestNewWayFunction · 0.80
TestBackoffLifecycleFunction · 0.80
TestCheckRetryClosesBodyFunction · 0.80

Calls

no outgoing calls

Tested by 15

TestDoRequestSuccessFunction · 0.64
TestDoRequestCreatedFunction · 0.64
TestDoRequestNotCreatedFunction · 0.64
TestBadRequestFunction · 0.64
TestRequestURIFunction · 0.64
TestURLTemplateFunction · 0.64
TestDoRequestNewWayFunction · 0.64
TestBackoffLifecycleFunction · 0.64
TestCheckRetryClosesBodyFunction · 0.64