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

Function NewListWatchFromClient

tools/cache/listwatch.go:71–76  ·  view source on GitHub ↗

NewListWatchFromClient creates a new ListWatch from the specified client, resource, namespace and field selector.

(c Getter, resource string, namespace string, fieldSelector fields.Selector)

Source from the content-addressed store, hash-verified

69
70// NewListWatchFromClient creates a new ListWatch from the specified client, resource, namespace and field selector.
71func NewListWatchFromClient(c Getter, resource string, namespace string, fieldSelector fields.Selector) *ListWatch {
72 optionsModifier := func(options *metav1.ListOptions) {
73 options.FieldSelector = fieldSelector.String()
74 }
75 return NewFilteredListWatchFromClient(c, resource, namespace, optionsModifier)
76}
77
78// NewFilteredListWatchFromClient creates a new ListWatch from the specified client, resource, namespace, and option modifier.
79// Option modifier is a function takes a ListOptions and modifies the consumed ListOptions. Provide customized modifier function

Callers 1

mainFunction · 0.92

Calls 2

StringMethod · 0.65

Tested by

no test coverage detected