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

Function NewForConfig

dynamic/simple.go:64–76  ·  view source on GitHub ↗

NewForConfig creates a new dynamic client or returns an error.

(inConfig *rest.Config)

Source from the content-addressed store, hash-verified

62
63// NewForConfig creates a new dynamic client or returns an error.
64func NewForConfig(inConfig *rest.Config) (Interface, error) {
65 config := ConfigFor(inConfig)
66 // for serializing the options
67 config.GroupVersion = &schema.GroupVersion{}
68 config.APIPath = "/if-you-see-this-search-for-the-break"
69
70 restClient, err := rest.RESTClientFor(config)
71 if err != nil {
72 return nil, err
73 }
74
75 return &dynamicClient{client: restClient}, nil
76}
77
78type dynamicResourceClient struct {
79 client *dynamicClient

Callers 3

NewClientFunction · 0.92
NewForConfigOrDieFunction · 0.70
getClientServerFunction · 0.70

Calls 2

RESTClientForFunction · 0.92
ConfigForFunction · 0.85

Tested by 1

getClientServerFunction · 0.56