[client-go] Add dynamic.Interface
This adds an interface form of dynamic.Client and dynamic.ResourceClient, making those two follow the general client conventions: `Interface` is an interface, and `Client` is the concrete implementation. `ClientPool` retains it's interface status. This allows us to create a fake implemenation of dyanmic.Interface, dynamic.ResourceInterface, and dynamic.ClientPool for testing.
This commit is contained in:
@@ -97,7 +97,7 @@ type GraphBuilder struct {
|
||||
ignoredResources map[schema.GroupResource]struct{}
|
||||
}
|
||||
|
||||
func listWatcher(client *dynamic.Client, resource schema.GroupVersionResource) *cache.ListWatch {
|
||||
func listWatcher(client dynamic.Interface, resource schema.GroupVersionResource) *cache.ListWatch {
|
||||
return &cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
// APIResource.Kind is not used by the dynamic client, so
|
||||
|
Reference in New Issue
Block a user