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

Method DeleteCollection

dynamic/simple.go:223–239  ·  view source on GitHub ↗
(opts *metav1.DeleteOptions, listOptions metav1.ListOptions)

Source from the content-addressed store, hash-verified

221}
222
223func (c *dynamicResourceClient) DeleteCollection(opts *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
224 if opts == nil {
225 opts = &metav1.DeleteOptions{}
226 }
227 deleteOptionsByte, err := runtime.Encode(deleteOptionsCodec.LegacyCodec(schema.GroupVersion{Version: "v1"}), opts)
228 if err != nil {
229 return err
230 }
231
232 result := c.client.client.
233 Delete().
234 AbsPath(c.makeURLSegments("")...).
235 Body(deleteOptionsByte).
236 SpecificallyVersionedParams(&listOptions, dynamicParameterCodec, versionV1).
237 Do()
238 return result.Error()
239}
240
241func (c *dynamicResourceClient) Get(name string, opts metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error) {
242 if len(name) == 0 {

Callers

nothing calls this directly

Calls 8

makeURLSegmentsMethod · 0.95
BodyMethod · 0.80
AbsPathMethod · 0.80
DoMethod · 0.65
DeleteMethod · 0.65
ErrorMethod · 0.65
EncodeMethod · 0.45

Tested by

no test coverage detected