NewForConfig creates a new dynamic client or returns an error.
(inConfig *rest.Config)
| 62 | |
| 63 | // NewForConfig creates a new dynamic client or returns an error. |
| 64 | func 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 | |
| 78 | type dynamicResourceClient struct { |
| 79 | client *dynamicClient |