1
0
mirror of https://github.com/rancher/types.git synced 2025-04-27 02:10:48 +00:00

Update generated code

This commit is contained in:
Darren Shepherd 2020-05-16 22:09:08 -07:00
parent 8d8abc899c
commit f477d5d0b2
300 changed files with 4421 additions and 19279 deletions

View File

@ -151,8 +151,6 @@ var (
lockAPIServiceControllerMockGeneric sync.RWMutex
lockAPIServiceControllerMockInformer sync.RWMutex
lockAPIServiceControllerMockLister sync.RWMutex
lockAPIServiceControllerMockStart sync.RWMutex
lockAPIServiceControllerMockSync sync.RWMutex
)
// Ensure, that APIServiceControllerMock does implement APIServiceController.
@ -192,12 +190,6 @@ var _ v1a.APIServiceController = &APIServiceControllerMock{}
// ListerFunc: func() v1a.APIServiceLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedAPIServiceController in code that requires APIServiceController
@ -232,12 +224,6 @@ type APIServiceControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v1a.APIServiceLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -309,18 +295,6 @@ type APIServiceControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -648,72 +622,6 @@ func (mock *APIServiceControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *APIServiceControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("APIServiceControllerMock.StartFunc: method is nil but APIServiceController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockAPIServiceControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockAPIServiceControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedAPIServiceController.StartCalls())
func (mock *APIServiceControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockAPIServiceControllerMockStart.RLock()
calls = mock.calls.Start
lockAPIServiceControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *APIServiceControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("APIServiceControllerMock.SyncFunc: method is nil but APIServiceController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockAPIServiceControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockAPIServiceControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedAPIServiceController.SyncCalls())
func (mock *APIServiceControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockAPIServiceControllerMockSync.RLock()
calls = mock.calls.Sync
lockAPIServiceControllerMockSync.RUnlock()
return calls
}
var (
lockAPIServiceInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockAPIServiceInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
@ -792,10 +700,10 @@ var _ v1a.APIServiceInterface = &APIServiceInterfaceMock{}
// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.APIService, error) {
// panic("mock out the GetNamespaced method")
// },
// ListFunc: func(opts v1b.ListOptions) (*v1a.APIServiceList, error) {
// ListFunc: func(opts v1b.ListOptions) (*v1.APIServiceList, error) {
// panic("mock out the List method")
// },
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.APIServiceList, error) {
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.APIServiceList, error) {
// panic("mock out the ListNamespaced method")
// },
// ObjectClientFunc: func() *objectclient.ObjectClient {
@ -860,10 +768,10 @@ type APIServiceInterfaceMock struct {
GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.APIService, error)
// ListFunc mocks the List method.
ListFunc func(opts v1b.ListOptions) (*v1a.APIServiceList, error)
ListFunc func(opts v1b.ListOptions) (*v1.APIServiceList, error)
// ListNamespacedFunc mocks the ListNamespaced method.
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.APIServiceList, error)
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.APIServiceList, error)
// ObjectClientFunc mocks the ObjectClient method.
ObjectClientFunc func() *objectclient.ObjectClient
@ -1624,7 +1532,7 @@ func (mock *APIServiceInterfaceMock) GetNamespacedCalls() []struct {
}
// List calls ListFunc.
func (mock *APIServiceInterfaceMock) List(opts v1b.ListOptions) (*v1a.APIServiceList, error) {
func (mock *APIServiceInterfaceMock) List(opts v1b.ListOptions) (*v1.APIServiceList, error) {
if mock.ListFunc == nil {
panic("APIServiceInterfaceMock.ListFunc: method is nil but APIServiceInterface.List was just called")
}
@ -1655,7 +1563,7 @@ func (mock *APIServiceInterfaceMock) ListCalls() []struct {
}
// ListNamespaced calls ListNamespacedFunc.
func (mock *APIServiceInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.APIServiceList, error) {
func (mock *APIServiceInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.APIServiceList, error) {
if mock.ListNamespacedFunc == nil {
panic("APIServiceInterfaceMock.ListNamespacedFunc: method is nil but APIServiceInterface.ListNamespaced was just called")
}

View File

@ -49,12 +49,6 @@ func NewAPIService(namespace, name string, obj v1.APIService) *v1.APIService {
return &obj
}
type APIServiceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []v1.APIService `json:"items"`
}
type APIServiceHandlerFunc func(key string, obj *v1.APIService) (runtime.Object, error)
type APIServiceChangeHandlerFunc func(obj *v1.APIService) (runtime.Object, error)
@ -74,8 +68,6 @@ type APIServiceController interface {
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler APIServiceHandlerFunc)
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, after time.Duration)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type APIServiceInterface interface {
@ -86,8 +78,8 @@ type APIServiceInterface interface {
Update(*v1.APIService) (*v1.APIService, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*APIServiceList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*APIServiceList, error)
List(opts metav1.ListOptions) (*v1.APIServiceList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.APIServiceList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() APIServiceController
@ -126,7 +118,7 @@ func (l *apiServiceLister) Get(namespace, name string) (*v1.APIService, error) {
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: APIServiceGroupVersionKind.Group,
Resource: "apiService",
Resource: APIServiceGroupVersionResource.Resource,
}, key)
}
return obj.(*v1.APIService), nil
@ -206,29 +198,16 @@ func (c apiServiceFactory) Object() runtime.Object {
}
func (c apiServiceFactory) List() runtime.Object {
return &APIServiceList{}
return &v1.APIServiceList{}
}
func (s *apiServiceClient) Controller() APIServiceController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.apiServiceControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(APIServiceGroupVersionKind.Kind+"Controller",
s.objectClient)
s.client.controllerFactory.ForResourceKind(APIServiceGroupVersionResource, APIServiceGroupVersionKind.Kind, false))
c = &apiServiceController{
return &apiServiceController{
GenericController: genericController,
}
s.client.apiServiceControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type apiServiceClient struct {
@ -262,6 +241,11 @@ func (s *apiServiceClient) Update(o *v1.APIService) (*v1.APIService, error) {
return obj.(*v1.APIService), err
}
func (s *apiServiceClient) UpdateStatus(o *v1.APIService) (*v1.APIService, error) {
obj, err := s.objectClient.UpdateStatus(o.Name, o)
return obj.(*v1.APIService), err
}
func (s *apiServiceClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
@ -270,14 +254,14 @@ func (s *apiServiceClient) DeleteNamespaced(namespace, name string, options *met
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *apiServiceClient) List(opts metav1.ListOptions) (*APIServiceList, error) {
func (s *apiServiceClient) List(opts metav1.ListOptions) (*v1.APIServiceList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*APIServiceList), err
return obj.(*v1.APIServiceList), err
}
func (s *apiServiceClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*APIServiceList, error) {
func (s *apiServiceClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.APIServiceList, error) {
obj, err := s.objectClient.ListNamespaced(namespace, opts)
return obj.(*APIServiceList), err
return obj.(*v1.APIServiceList), err
}
func (s *apiServiceClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {

View File

@ -1,39 +0,0 @@
package v1
import (
runtime "k8s.io/apimachinery/pkg/runtime"
apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *APIServiceList) DeepCopyInto(out *APIServiceList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]apiregistrationv1.APIService, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServiceList.
func (in *APIServiceList) DeepCopy() *APIServiceList {
if in == nil {
return nil
}
out := new(APIServiceList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *APIServiceList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}

View File

@ -1,71 +1,34 @@
package v1
import (
"context"
"sync"
"github.com/rancher/norman/controller"
"github.com/rancher/lasso/pkg/client"
"github.com/rancher/lasso/pkg/controller"
"github.com/rancher/norman/objectclient"
"github.com/rancher/norman/objectclient/dynamic"
"github.com/rancher/norman/restwatch"
"k8s.io/client-go/rest"
)
type (
contextKeyType struct{}
contextClientsKeyType struct{}
)
type Interface interface {
RESTClient() rest.Interface
controller.Starter
APIServicesGetter
}
type Client struct {
sync.Mutex
restClient rest.Interface
starters []controller.Starter
apiServiceControllers map[string]APIServiceController
controllerFactory controller.SharedControllerFactory
clientFactory client.SharedClientFactory
}
func NewForConfig(config rest.Config) (Interface, error) {
if config.NegotiatedSerializer == nil {
config.NegotiatedSerializer = dynamic.NegotiatedSerializer
}
restClient, err := restwatch.UnversionedRESTClientFor(&config)
if err != nil {
return nil, err
}
func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) {
return &Client{
restClient: restClient,
apiServiceControllers: map[string]APIServiceController{},
controllerFactory: factory,
clientFactory: factory.SharedCacheFactory().SharedClientFactory(),
}, nil
}
func (c *Client) RESTClient() rest.Interface {
return c.restClient
}
func (c *Client) Sync(ctx context.Context) error {
return controller.Sync(ctx, c.starters...)
}
func (c *Client) Start(ctx context.Context, threadiness int) error {
return controller.Start(ctx, threadiness, c.starters...)
}
type APIServicesGetter interface {
APIServices(namespace string) APIServiceInterface
}
func (c *Client) APIServices(namespace string) APIServiceInterface {
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &APIServiceResource, APIServiceGroupVersionKind, apiServiceFactory{})
sharedClient := c.clientFactory.ForResourceKind(APIServiceGroupVersionResource, APIServiceGroupVersionKind.Kind, false)
objectClient := objectclient.NewObjectClient(namespace, sharedClient, &APIServiceResource, APIServiceGroupVersionKind, apiServiceFactory{})
return &apiServiceClient{
ns: namespace,
client: c,

View File

@ -1,8 +1,6 @@
package v1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
@ -23,19 +21,3 @@ func Kind(kind string) schema.GroupKind {
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
var (
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
AddToScheme = SchemeBuilder.AddToScheme
)
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
// TODO this gets cleaned up when the types are fixed
scheme.AddKnownTypes(SchemeGroupVersion,
&APIServiceList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}

View File

@ -151,8 +151,6 @@ var (
lockDaemonSetControllerMockGeneric sync.RWMutex
lockDaemonSetControllerMockInformer sync.RWMutex
lockDaemonSetControllerMockLister sync.RWMutex
lockDaemonSetControllerMockStart sync.RWMutex
lockDaemonSetControllerMockSync sync.RWMutex
)
// Ensure, that DaemonSetControllerMock does implement DaemonSetController.
@ -192,12 +190,6 @@ var _ v1a.DaemonSetController = &DaemonSetControllerMock{}
// ListerFunc: func() v1a.DaemonSetLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedDaemonSetController in code that requires DaemonSetController
@ -232,12 +224,6 @@ type DaemonSetControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v1a.DaemonSetLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -309,18 +295,6 @@ type DaemonSetControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -648,72 +622,6 @@ func (mock *DaemonSetControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *DaemonSetControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("DaemonSetControllerMock.StartFunc: method is nil but DaemonSetController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockDaemonSetControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockDaemonSetControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedDaemonSetController.StartCalls())
func (mock *DaemonSetControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockDaemonSetControllerMockStart.RLock()
calls = mock.calls.Start
lockDaemonSetControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *DaemonSetControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("DaemonSetControllerMock.SyncFunc: method is nil but DaemonSetController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockDaemonSetControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockDaemonSetControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedDaemonSetController.SyncCalls())
func (mock *DaemonSetControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockDaemonSetControllerMockSync.RLock()
calls = mock.calls.Sync
lockDaemonSetControllerMockSync.RUnlock()
return calls
}
var (
lockDaemonSetInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockDaemonSetInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
@ -792,10 +700,10 @@ var _ v1a.DaemonSetInterface = &DaemonSetInterfaceMock{}
// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.DaemonSet, error) {
// panic("mock out the GetNamespaced method")
// },
// ListFunc: func(opts v1b.ListOptions) (*v1a.DaemonSetList, error) {
// ListFunc: func(opts v1b.ListOptions) (*v1.DaemonSetList, error) {
// panic("mock out the List method")
// },
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.DaemonSetList, error) {
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.DaemonSetList, error) {
// panic("mock out the ListNamespaced method")
// },
// ObjectClientFunc: func() *objectclient.ObjectClient {
@ -860,10 +768,10 @@ type DaemonSetInterfaceMock struct {
GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.DaemonSet, error)
// ListFunc mocks the List method.
ListFunc func(opts v1b.ListOptions) (*v1a.DaemonSetList, error)
ListFunc func(opts v1b.ListOptions) (*v1.DaemonSetList, error)
// ListNamespacedFunc mocks the ListNamespaced method.
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.DaemonSetList, error)
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.DaemonSetList, error)
// ObjectClientFunc mocks the ObjectClient method.
ObjectClientFunc func() *objectclient.ObjectClient
@ -1624,7 +1532,7 @@ func (mock *DaemonSetInterfaceMock) GetNamespacedCalls() []struct {
}
// List calls ListFunc.
func (mock *DaemonSetInterfaceMock) List(opts v1b.ListOptions) (*v1a.DaemonSetList, error) {
func (mock *DaemonSetInterfaceMock) List(opts v1b.ListOptions) (*v1.DaemonSetList, error) {
if mock.ListFunc == nil {
panic("DaemonSetInterfaceMock.ListFunc: method is nil but DaemonSetInterface.List was just called")
}
@ -1655,7 +1563,7 @@ func (mock *DaemonSetInterfaceMock) ListCalls() []struct {
}
// ListNamespaced calls ListNamespacedFunc.
func (mock *DaemonSetInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.DaemonSetList, error) {
func (mock *DaemonSetInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.DaemonSetList, error) {
if mock.ListNamespacedFunc == nil {
panic("DaemonSetInterfaceMock.ListNamespacedFunc: method is nil but DaemonSetInterface.ListNamespaced was just called")
}

View File

@ -151,8 +151,6 @@ var (
lockDeploymentControllerMockGeneric sync.RWMutex
lockDeploymentControllerMockInformer sync.RWMutex
lockDeploymentControllerMockLister sync.RWMutex
lockDeploymentControllerMockStart sync.RWMutex
lockDeploymentControllerMockSync sync.RWMutex
)
// Ensure, that DeploymentControllerMock does implement DeploymentController.
@ -192,12 +190,6 @@ var _ v1a.DeploymentController = &DeploymentControllerMock{}
// ListerFunc: func() v1a.DeploymentLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedDeploymentController in code that requires DeploymentController
@ -232,12 +224,6 @@ type DeploymentControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v1a.DeploymentLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -309,18 +295,6 @@ type DeploymentControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -648,72 +622,6 @@ func (mock *DeploymentControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *DeploymentControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("DeploymentControllerMock.StartFunc: method is nil but DeploymentController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockDeploymentControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockDeploymentControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedDeploymentController.StartCalls())
func (mock *DeploymentControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockDeploymentControllerMockStart.RLock()
calls = mock.calls.Start
lockDeploymentControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *DeploymentControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("DeploymentControllerMock.SyncFunc: method is nil but DeploymentController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockDeploymentControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockDeploymentControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedDeploymentController.SyncCalls())
func (mock *DeploymentControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockDeploymentControllerMockSync.RLock()
calls = mock.calls.Sync
lockDeploymentControllerMockSync.RUnlock()
return calls
}
var (
lockDeploymentInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockDeploymentInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
@ -792,10 +700,10 @@ var _ v1a.DeploymentInterface = &DeploymentInterfaceMock{}
// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Deployment, error) {
// panic("mock out the GetNamespaced method")
// },
// ListFunc: func(opts v1b.ListOptions) (*v1a.DeploymentList, error) {
// ListFunc: func(opts v1b.ListOptions) (*v1.DeploymentList, error) {
// panic("mock out the List method")
// },
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.DeploymentList, error) {
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.DeploymentList, error) {
// panic("mock out the ListNamespaced method")
// },
// ObjectClientFunc: func() *objectclient.ObjectClient {
@ -860,10 +768,10 @@ type DeploymentInterfaceMock struct {
GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Deployment, error)
// ListFunc mocks the List method.
ListFunc func(opts v1b.ListOptions) (*v1a.DeploymentList, error)
ListFunc func(opts v1b.ListOptions) (*v1.DeploymentList, error)
// ListNamespacedFunc mocks the ListNamespaced method.
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.DeploymentList, error)
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.DeploymentList, error)
// ObjectClientFunc mocks the ObjectClient method.
ObjectClientFunc func() *objectclient.ObjectClient
@ -1624,7 +1532,7 @@ func (mock *DeploymentInterfaceMock) GetNamespacedCalls() []struct {
}
// List calls ListFunc.
func (mock *DeploymentInterfaceMock) List(opts v1b.ListOptions) (*v1a.DeploymentList, error) {
func (mock *DeploymentInterfaceMock) List(opts v1b.ListOptions) (*v1.DeploymentList, error) {
if mock.ListFunc == nil {
panic("DeploymentInterfaceMock.ListFunc: method is nil but DeploymentInterface.List was just called")
}
@ -1655,7 +1563,7 @@ func (mock *DeploymentInterfaceMock) ListCalls() []struct {
}
// ListNamespaced calls ListNamespacedFunc.
func (mock *DeploymentInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.DeploymentList, error) {
func (mock *DeploymentInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.DeploymentList, error) {
if mock.ListNamespacedFunc == nil {
panic("DeploymentInterfaceMock.ListNamespacedFunc: method is nil but DeploymentInterface.ListNamespaced was just called")
}

View File

@ -151,8 +151,6 @@ var (
lockReplicaSetControllerMockGeneric sync.RWMutex
lockReplicaSetControllerMockInformer sync.RWMutex
lockReplicaSetControllerMockLister sync.RWMutex
lockReplicaSetControllerMockStart sync.RWMutex
lockReplicaSetControllerMockSync sync.RWMutex
)
// Ensure, that ReplicaSetControllerMock does implement ReplicaSetController.
@ -192,12 +190,6 @@ var _ v1a.ReplicaSetController = &ReplicaSetControllerMock{}
// ListerFunc: func() v1a.ReplicaSetLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedReplicaSetController in code that requires ReplicaSetController
@ -232,12 +224,6 @@ type ReplicaSetControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v1a.ReplicaSetLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -309,18 +295,6 @@ type ReplicaSetControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -648,72 +622,6 @@ func (mock *ReplicaSetControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *ReplicaSetControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("ReplicaSetControllerMock.StartFunc: method is nil but ReplicaSetController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockReplicaSetControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockReplicaSetControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedReplicaSetController.StartCalls())
func (mock *ReplicaSetControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockReplicaSetControllerMockStart.RLock()
calls = mock.calls.Start
lockReplicaSetControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *ReplicaSetControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("ReplicaSetControllerMock.SyncFunc: method is nil but ReplicaSetController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockReplicaSetControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockReplicaSetControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedReplicaSetController.SyncCalls())
func (mock *ReplicaSetControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockReplicaSetControllerMockSync.RLock()
calls = mock.calls.Sync
lockReplicaSetControllerMockSync.RUnlock()
return calls
}
var (
lockReplicaSetInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockReplicaSetInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
@ -792,10 +700,10 @@ var _ v1a.ReplicaSetInterface = &ReplicaSetInterfaceMock{}
// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.ReplicaSet, error) {
// panic("mock out the GetNamespaced method")
// },
// ListFunc: func(opts v1b.ListOptions) (*v1a.ReplicaSetList, error) {
// ListFunc: func(opts v1b.ListOptions) (*v1.ReplicaSetList, error) {
// panic("mock out the List method")
// },
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.ReplicaSetList, error) {
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.ReplicaSetList, error) {
// panic("mock out the ListNamespaced method")
// },
// ObjectClientFunc: func() *objectclient.ObjectClient {
@ -860,10 +768,10 @@ type ReplicaSetInterfaceMock struct {
GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.ReplicaSet, error)
// ListFunc mocks the List method.
ListFunc func(opts v1b.ListOptions) (*v1a.ReplicaSetList, error)
ListFunc func(opts v1b.ListOptions) (*v1.ReplicaSetList, error)
// ListNamespacedFunc mocks the ListNamespaced method.
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.ReplicaSetList, error)
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.ReplicaSetList, error)
// ObjectClientFunc mocks the ObjectClient method.
ObjectClientFunc func() *objectclient.ObjectClient
@ -1624,7 +1532,7 @@ func (mock *ReplicaSetInterfaceMock) GetNamespacedCalls() []struct {
}
// List calls ListFunc.
func (mock *ReplicaSetInterfaceMock) List(opts v1b.ListOptions) (*v1a.ReplicaSetList, error) {
func (mock *ReplicaSetInterfaceMock) List(opts v1b.ListOptions) (*v1.ReplicaSetList, error) {
if mock.ListFunc == nil {
panic("ReplicaSetInterfaceMock.ListFunc: method is nil but ReplicaSetInterface.List was just called")
}
@ -1655,7 +1563,7 @@ func (mock *ReplicaSetInterfaceMock) ListCalls() []struct {
}
// ListNamespaced calls ListNamespacedFunc.
func (mock *ReplicaSetInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.ReplicaSetList, error) {
func (mock *ReplicaSetInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.ReplicaSetList, error) {
if mock.ListNamespacedFunc == nil {
panic("ReplicaSetInterfaceMock.ListNamespacedFunc: method is nil but ReplicaSetInterface.ListNamespaced was just called")
}

View File

@ -151,8 +151,6 @@ var (
lockStatefulSetControllerMockGeneric sync.RWMutex
lockStatefulSetControllerMockInformer sync.RWMutex
lockStatefulSetControllerMockLister sync.RWMutex
lockStatefulSetControllerMockStart sync.RWMutex
lockStatefulSetControllerMockSync sync.RWMutex
)
// Ensure, that StatefulSetControllerMock does implement StatefulSetController.
@ -192,12 +190,6 @@ var _ v1a.StatefulSetController = &StatefulSetControllerMock{}
// ListerFunc: func() v1a.StatefulSetLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedStatefulSetController in code that requires StatefulSetController
@ -232,12 +224,6 @@ type StatefulSetControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v1a.StatefulSetLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -309,18 +295,6 @@ type StatefulSetControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -648,72 +622,6 @@ func (mock *StatefulSetControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *StatefulSetControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("StatefulSetControllerMock.StartFunc: method is nil but StatefulSetController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockStatefulSetControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockStatefulSetControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedStatefulSetController.StartCalls())
func (mock *StatefulSetControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockStatefulSetControllerMockStart.RLock()
calls = mock.calls.Start
lockStatefulSetControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *StatefulSetControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("StatefulSetControllerMock.SyncFunc: method is nil but StatefulSetController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockStatefulSetControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockStatefulSetControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedStatefulSetController.SyncCalls())
func (mock *StatefulSetControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockStatefulSetControllerMockSync.RLock()
calls = mock.calls.Sync
lockStatefulSetControllerMockSync.RUnlock()
return calls
}
var (
lockStatefulSetInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockStatefulSetInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
@ -792,10 +700,10 @@ var _ v1a.StatefulSetInterface = &StatefulSetInterfaceMock{}
// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.StatefulSet, error) {
// panic("mock out the GetNamespaced method")
// },
// ListFunc: func(opts v1b.ListOptions) (*v1a.StatefulSetList, error) {
// ListFunc: func(opts v1b.ListOptions) (*v1.StatefulSetList, error) {
// panic("mock out the List method")
// },
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.StatefulSetList, error) {
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.StatefulSetList, error) {
// panic("mock out the ListNamespaced method")
// },
// ObjectClientFunc: func() *objectclient.ObjectClient {
@ -860,10 +768,10 @@ type StatefulSetInterfaceMock struct {
GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.StatefulSet, error)
// ListFunc mocks the List method.
ListFunc func(opts v1b.ListOptions) (*v1a.StatefulSetList, error)
ListFunc func(opts v1b.ListOptions) (*v1.StatefulSetList, error)
// ListNamespacedFunc mocks the ListNamespaced method.
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.StatefulSetList, error)
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.StatefulSetList, error)
// ObjectClientFunc mocks the ObjectClient method.
ObjectClientFunc func() *objectclient.ObjectClient
@ -1624,7 +1532,7 @@ func (mock *StatefulSetInterfaceMock) GetNamespacedCalls() []struct {
}
// List calls ListFunc.
func (mock *StatefulSetInterfaceMock) List(opts v1b.ListOptions) (*v1a.StatefulSetList, error) {
func (mock *StatefulSetInterfaceMock) List(opts v1b.ListOptions) (*v1.StatefulSetList, error) {
if mock.ListFunc == nil {
panic("StatefulSetInterfaceMock.ListFunc: method is nil but StatefulSetInterface.List was just called")
}
@ -1655,7 +1563,7 @@ func (mock *StatefulSetInterfaceMock) ListCalls() []struct {
}
// ListNamespaced calls ListNamespacedFunc.
func (mock *StatefulSetInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.StatefulSetList, error) {
func (mock *StatefulSetInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.StatefulSetList, error) {
if mock.ListNamespacedFunc == nil {
panic("StatefulSetInterfaceMock.ListNamespacedFunc: method is nil but StatefulSetInterface.ListNamespaced was just called")
}

View File

@ -50,12 +50,6 @@ func NewDaemonSet(namespace, name string, obj v1.DaemonSet) *v1.DaemonSet {
return &obj
}
type DaemonSetList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []v1.DaemonSet `json:"items"`
}
type DaemonSetHandlerFunc func(key string, obj *v1.DaemonSet) (runtime.Object, error)
type DaemonSetChangeHandlerFunc func(obj *v1.DaemonSet) (runtime.Object, error)
@ -75,8 +69,6 @@ type DaemonSetController interface {
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler DaemonSetHandlerFunc)
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, after time.Duration)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type DaemonSetInterface interface {
@ -87,8 +79,8 @@ type DaemonSetInterface interface {
Update(*v1.DaemonSet) (*v1.DaemonSet, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*DaemonSetList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*DaemonSetList, error)
List(opts metav1.ListOptions) (*v1.DaemonSetList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.DaemonSetList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() DaemonSetController
@ -127,7 +119,7 @@ func (l *daemonSetLister) Get(namespace, name string) (*v1.DaemonSet, error) {
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: DaemonSetGroupVersionKind.Group,
Resource: "daemonSet",
Resource: DaemonSetGroupVersionResource.Resource,
}, key)
}
return obj.(*v1.DaemonSet), nil
@ -207,29 +199,16 @@ func (c daemonSetFactory) Object() runtime.Object {
}
func (c daemonSetFactory) List() runtime.Object {
return &DaemonSetList{}
return &v1.DaemonSetList{}
}
func (s *daemonSetClient) Controller() DaemonSetController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.daemonSetControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(DaemonSetGroupVersionKind.Kind+"Controller",
s.objectClient)
s.client.controllerFactory.ForResourceKind(DaemonSetGroupVersionResource, DaemonSetGroupVersionKind.Kind, true))
c = &daemonSetController{
return &daemonSetController{
GenericController: genericController,
}
s.client.daemonSetControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type daemonSetClient struct {
@ -263,6 +242,11 @@ func (s *daemonSetClient) Update(o *v1.DaemonSet) (*v1.DaemonSet, error) {
return obj.(*v1.DaemonSet), err
}
func (s *daemonSetClient) UpdateStatus(o *v1.DaemonSet) (*v1.DaemonSet, error) {
obj, err := s.objectClient.UpdateStatus(o.Name, o)
return obj.(*v1.DaemonSet), err
}
func (s *daemonSetClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
@ -271,14 +255,14 @@ func (s *daemonSetClient) DeleteNamespaced(namespace, name string, options *meta
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *daemonSetClient) List(opts metav1.ListOptions) (*DaemonSetList, error) {
func (s *daemonSetClient) List(opts metav1.ListOptions) (*v1.DaemonSetList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*DaemonSetList), err
return obj.(*v1.DaemonSetList), err
}
func (s *daemonSetClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*DaemonSetList, error) {
func (s *daemonSetClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.DaemonSetList, error) {
obj, err := s.objectClient.ListNamespaced(namespace, opts)
return obj.(*DaemonSetList), err
return obj.(*v1.DaemonSetList), err
}
func (s *daemonSetClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {

View File

@ -1,138 +0,0 @@
package v1
import (
appsv1 "k8s.io/api/apps/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DaemonSetList) DeepCopyInto(out *DaemonSetList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]appsv1.DaemonSet, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSetList.
func (in *DaemonSetList) DeepCopy() *DaemonSetList {
if in == nil {
return nil
}
out := new(DaemonSetList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *DaemonSetList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DeploymentList) DeepCopyInto(out *DeploymentList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]appsv1.Deployment, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentList.
func (in *DeploymentList) DeepCopy() *DeploymentList {
if in == nil {
return nil
}
out := new(DeploymentList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *DeploymentList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ReplicaSetList) DeepCopyInto(out *ReplicaSetList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]appsv1.ReplicaSet, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSetList.
func (in *ReplicaSetList) DeepCopy() *ReplicaSetList {
if in == nil {
return nil
}
out := new(ReplicaSetList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ReplicaSetList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *StatefulSetList) DeepCopyInto(out *StatefulSetList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]appsv1.StatefulSet, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetList.
func (in *StatefulSetList) DeepCopy() *StatefulSetList {
if in == nil {
return nil
}
out := new(StatefulSetList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *StatefulSetList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}

View File

@ -50,12 +50,6 @@ func NewDeployment(namespace, name string, obj v1.Deployment) *v1.Deployment {
return &obj
}
type DeploymentList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []v1.Deployment `json:"items"`
}
type DeploymentHandlerFunc func(key string, obj *v1.Deployment) (runtime.Object, error)
type DeploymentChangeHandlerFunc func(obj *v1.Deployment) (runtime.Object, error)
@ -75,8 +69,6 @@ type DeploymentController interface {
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler DeploymentHandlerFunc)
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, after time.Duration)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type DeploymentInterface interface {
@ -87,8 +79,8 @@ type DeploymentInterface interface {
Update(*v1.Deployment) (*v1.Deployment, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*DeploymentList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*DeploymentList, error)
List(opts metav1.ListOptions) (*v1.DeploymentList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.DeploymentList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() DeploymentController
@ -127,7 +119,7 @@ func (l *deploymentLister) Get(namespace, name string) (*v1.Deployment, error) {
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: DeploymentGroupVersionKind.Group,
Resource: "deployment",
Resource: DeploymentGroupVersionResource.Resource,
}, key)
}
return obj.(*v1.Deployment), nil
@ -207,29 +199,16 @@ func (c deploymentFactory) Object() runtime.Object {
}
func (c deploymentFactory) List() runtime.Object {
return &DeploymentList{}
return &v1.DeploymentList{}
}
func (s *deploymentClient) Controller() DeploymentController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.deploymentControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(DeploymentGroupVersionKind.Kind+"Controller",
s.objectClient)
s.client.controllerFactory.ForResourceKind(DeploymentGroupVersionResource, DeploymentGroupVersionKind.Kind, true))
c = &deploymentController{
return &deploymentController{
GenericController: genericController,
}
s.client.deploymentControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type deploymentClient struct {
@ -263,6 +242,11 @@ func (s *deploymentClient) Update(o *v1.Deployment) (*v1.Deployment, error) {
return obj.(*v1.Deployment), err
}
func (s *deploymentClient) UpdateStatus(o *v1.Deployment) (*v1.Deployment, error) {
obj, err := s.objectClient.UpdateStatus(o.Name, o)
return obj.(*v1.Deployment), err
}
func (s *deploymentClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
@ -271,14 +255,14 @@ func (s *deploymentClient) DeleteNamespaced(namespace, name string, options *met
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *deploymentClient) List(opts metav1.ListOptions) (*DeploymentList, error) {
func (s *deploymentClient) List(opts metav1.ListOptions) (*v1.DeploymentList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*DeploymentList), err
return obj.(*v1.DeploymentList), err
}
func (s *deploymentClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*DeploymentList, error) {
func (s *deploymentClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.DeploymentList, error) {
obj, err := s.objectClient.ListNamespaced(namespace, opts)
return obj.(*DeploymentList), err
return obj.(*v1.DeploymentList), err
}
func (s *deploymentClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {

View File

@ -1,25 +1,12 @@
package v1
import (
"context"
"sync"
"github.com/rancher/norman/controller"
"github.com/rancher/lasso/pkg/client"
"github.com/rancher/lasso/pkg/controller"
"github.com/rancher/norman/objectclient"
"github.com/rancher/norman/objectclient/dynamic"
"github.com/rancher/norman/restwatch"
"k8s.io/client-go/rest"
)
type (
contextKeyType struct{}
contextClientsKeyType struct{}
)
type Interface interface {
RESTClient() rest.Interface
controller.Starter
DeploymentsGetter
DaemonSetsGetter
StatefulSetsGetter
@ -27,54 +14,24 @@ type Interface interface {
}
type Client struct {
sync.Mutex
restClient rest.Interface
starters []controller.Starter
deploymentControllers map[string]DeploymentController
daemonSetControllers map[string]DaemonSetController
statefulSetControllers map[string]StatefulSetController
replicaSetControllers map[string]ReplicaSetController
controllerFactory controller.SharedControllerFactory
clientFactory client.SharedClientFactory
}
func NewForConfig(config rest.Config) (Interface, error) {
if config.NegotiatedSerializer == nil {
config.NegotiatedSerializer = dynamic.NegotiatedSerializer
}
restClient, err := restwatch.UnversionedRESTClientFor(&config)
if err != nil {
return nil, err
}
func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) {
return &Client{
restClient: restClient,
deploymentControllers: map[string]DeploymentController{},
daemonSetControllers: map[string]DaemonSetController{},
statefulSetControllers: map[string]StatefulSetController{},
replicaSetControllers: map[string]ReplicaSetController{},
controllerFactory: factory,
clientFactory: factory.SharedCacheFactory().SharedClientFactory(),
}, nil
}
func (c *Client) RESTClient() rest.Interface {
return c.restClient
}
func (c *Client) Sync(ctx context.Context) error {
return controller.Sync(ctx, c.starters...)
}
func (c *Client) Start(ctx context.Context, threadiness int) error {
return controller.Start(ctx, threadiness, c.starters...)
}
type DeploymentsGetter interface {
Deployments(namespace string) DeploymentInterface
}
func (c *Client) Deployments(namespace string) DeploymentInterface {
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &DeploymentResource, DeploymentGroupVersionKind, deploymentFactory{})
sharedClient := c.clientFactory.ForResourceKind(DeploymentGroupVersionResource, DeploymentGroupVersionKind.Kind, true)
objectClient := objectclient.NewObjectClient(namespace, sharedClient, &DeploymentResource, DeploymentGroupVersionKind, deploymentFactory{})
return &deploymentClient{
ns: namespace,
client: c,
@ -87,7 +44,8 @@ type DaemonSetsGetter interface {
}
func (c *Client) DaemonSets(namespace string) DaemonSetInterface {
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &DaemonSetResource, DaemonSetGroupVersionKind, daemonSetFactory{})
sharedClient := c.clientFactory.ForResourceKind(DaemonSetGroupVersionResource, DaemonSetGroupVersionKind.Kind, true)
objectClient := objectclient.NewObjectClient(namespace, sharedClient, &DaemonSetResource, DaemonSetGroupVersionKind, daemonSetFactory{})
return &daemonSetClient{
ns: namespace,
client: c,
@ -100,7 +58,8 @@ type StatefulSetsGetter interface {
}
func (c *Client) StatefulSets(namespace string) StatefulSetInterface {
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &StatefulSetResource, StatefulSetGroupVersionKind, statefulSetFactory{})
sharedClient := c.clientFactory.ForResourceKind(StatefulSetGroupVersionResource, StatefulSetGroupVersionKind.Kind, true)
objectClient := objectclient.NewObjectClient(namespace, sharedClient, &StatefulSetResource, StatefulSetGroupVersionKind, statefulSetFactory{})
return &statefulSetClient{
ns: namespace,
client: c,
@ -113,7 +72,8 @@ type ReplicaSetsGetter interface {
}
func (c *Client) ReplicaSets(namespace string) ReplicaSetInterface {
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ReplicaSetResource, ReplicaSetGroupVersionKind, replicaSetFactory{})
sharedClient := c.clientFactory.ForResourceKind(ReplicaSetGroupVersionResource, ReplicaSetGroupVersionKind.Kind, true)
objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ReplicaSetResource, ReplicaSetGroupVersionKind, replicaSetFactory{})
return &replicaSetClient{
ns: namespace,
client: c,

View File

@ -50,12 +50,6 @@ func NewReplicaSet(namespace, name string, obj v1.ReplicaSet) *v1.ReplicaSet {
return &obj
}
type ReplicaSetList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []v1.ReplicaSet `json:"items"`
}
type ReplicaSetHandlerFunc func(key string, obj *v1.ReplicaSet) (runtime.Object, error)
type ReplicaSetChangeHandlerFunc func(obj *v1.ReplicaSet) (runtime.Object, error)
@ -75,8 +69,6 @@ type ReplicaSetController interface {
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ReplicaSetHandlerFunc)
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, after time.Duration)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type ReplicaSetInterface interface {
@ -87,8 +79,8 @@ type ReplicaSetInterface interface {
Update(*v1.ReplicaSet) (*v1.ReplicaSet, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*ReplicaSetList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*ReplicaSetList, error)
List(opts metav1.ListOptions) (*v1.ReplicaSetList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ReplicaSetList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() ReplicaSetController
@ -127,7 +119,7 @@ func (l *replicaSetLister) Get(namespace, name string) (*v1.ReplicaSet, error) {
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: ReplicaSetGroupVersionKind.Group,
Resource: "replicaSet",
Resource: ReplicaSetGroupVersionResource.Resource,
}, key)
}
return obj.(*v1.ReplicaSet), nil
@ -207,29 +199,16 @@ func (c replicaSetFactory) Object() runtime.Object {
}
func (c replicaSetFactory) List() runtime.Object {
return &ReplicaSetList{}
return &v1.ReplicaSetList{}
}
func (s *replicaSetClient) Controller() ReplicaSetController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.replicaSetControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(ReplicaSetGroupVersionKind.Kind+"Controller",
s.objectClient)
s.client.controllerFactory.ForResourceKind(ReplicaSetGroupVersionResource, ReplicaSetGroupVersionKind.Kind, true))
c = &replicaSetController{
return &replicaSetController{
GenericController: genericController,
}
s.client.replicaSetControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type replicaSetClient struct {
@ -263,6 +242,11 @@ func (s *replicaSetClient) Update(o *v1.ReplicaSet) (*v1.ReplicaSet, error) {
return obj.(*v1.ReplicaSet), err
}
func (s *replicaSetClient) UpdateStatus(o *v1.ReplicaSet) (*v1.ReplicaSet, error) {
obj, err := s.objectClient.UpdateStatus(o.Name, o)
return obj.(*v1.ReplicaSet), err
}
func (s *replicaSetClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
@ -271,14 +255,14 @@ func (s *replicaSetClient) DeleteNamespaced(namespace, name string, options *met
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *replicaSetClient) List(opts metav1.ListOptions) (*ReplicaSetList, error) {
func (s *replicaSetClient) List(opts metav1.ListOptions) (*v1.ReplicaSetList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*ReplicaSetList), err
return obj.(*v1.ReplicaSetList), err
}
func (s *replicaSetClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*ReplicaSetList, error) {
func (s *replicaSetClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ReplicaSetList, error) {
obj, err := s.objectClient.ListNamespaced(namespace, opts)
return obj.(*ReplicaSetList), err
return obj.(*v1.ReplicaSetList), err
}
func (s *replicaSetClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {

View File

@ -1,8 +1,6 @@
package v1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
@ -23,22 +21,3 @@ func Kind(kind string) schema.GroupKind {
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
var (
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
AddToScheme = SchemeBuilder.AddToScheme
)
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
// TODO this gets cleaned up when the types are fixed
scheme.AddKnownTypes(SchemeGroupVersion,
&DeploymentList{},
&DaemonSetList{},
&StatefulSetList{},
&ReplicaSetList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}

View File

@ -50,12 +50,6 @@ func NewStatefulSet(namespace, name string, obj v1.StatefulSet) *v1.StatefulSet
return &obj
}
type StatefulSetList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []v1.StatefulSet `json:"items"`
}
type StatefulSetHandlerFunc func(key string, obj *v1.StatefulSet) (runtime.Object, error)
type StatefulSetChangeHandlerFunc func(obj *v1.StatefulSet) (runtime.Object, error)
@ -75,8 +69,6 @@ type StatefulSetController interface {
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler StatefulSetHandlerFunc)
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, after time.Duration)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type StatefulSetInterface interface {
@ -87,8 +79,8 @@ type StatefulSetInterface interface {
Update(*v1.StatefulSet) (*v1.StatefulSet, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*StatefulSetList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*StatefulSetList, error)
List(opts metav1.ListOptions) (*v1.StatefulSetList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.StatefulSetList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() StatefulSetController
@ -127,7 +119,7 @@ func (l *statefulSetLister) Get(namespace, name string) (*v1.StatefulSet, error)
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: StatefulSetGroupVersionKind.Group,
Resource: "statefulSet",
Resource: StatefulSetGroupVersionResource.Resource,
}, key)
}
return obj.(*v1.StatefulSet), nil
@ -207,29 +199,16 @@ func (c statefulSetFactory) Object() runtime.Object {
}
func (c statefulSetFactory) List() runtime.Object {
return &StatefulSetList{}
return &v1.StatefulSetList{}
}
func (s *statefulSetClient) Controller() StatefulSetController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.statefulSetControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(StatefulSetGroupVersionKind.Kind+"Controller",
s.objectClient)
s.client.controllerFactory.ForResourceKind(StatefulSetGroupVersionResource, StatefulSetGroupVersionKind.Kind, true))
c = &statefulSetController{
return &statefulSetController{
GenericController: genericController,
}
s.client.statefulSetControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type statefulSetClient struct {
@ -263,6 +242,11 @@ func (s *statefulSetClient) Update(o *v1.StatefulSet) (*v1.StatefulSet, error) {
return obj.(*v1.StatefulSet), err
}
func (s *statefulSetClient) UpdateStatus(o *v1.StatefulSet) (*v1.StatefulSet, error) {
obj, err := s.objectClient.UpdateStatus(o.Name, o)
return obj.(*v1.StatefulSet), err
}
func (s *statefulSetClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
@ -271,14 +255,14 @@ func (s *statefulSetClient) DeleteNamespaced(namespace, name string, options *me
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *statefulSetClient) List(opts metav1.ListOptions) (*StatefulSetList, error) {
func (s *statefulSetClient) List(opts metav1.ListOptions) (*v1.StatefulSetList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*StatefulSetList), err
return obj.(*v1.StatefulSetList), err
}
func (s *statefulSetClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*StatefulSetList, error) {
func (s *statefulSetClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.StatefulSetList, error) {
obj, err := s.objectClient.ListNamespaced(namespace, opts)
return obj.(*StatefulSetList), err
return obj.(*v1.StatefulSetList), err
}
func (s *statefulSetClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {

View File

@ -151,8 +151,6 @@ var (
lockHorizontalPodAutoscalerControllerMockGeneric sync.RWMutex
lockHorizontalPodAutoscalerControllerMockInformer sync.RWMutex
lockHorizontalPodAutoscalerControllerMockLister sync.RWMutex
lockHorizontalPodAutoscalerControllerMockStart sync.RWMutex
lockHorizontalPodAutoscalerControllerMockSync sync.RWMutex
)
// Ensure, that HorizontalPodAutoscalerControllerMock does implement HorizontalPodAutoscalerController.
@ -192,12 +190,6 @@ var _ v2beta2a.HorizontalPodAutoscalerController = &HorizontalPodAutoscalerContr
// ListerFunc: func() v2beta2a.HorizontalPodAutoscalerLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedHorizontalPodAutoscalerController in code that requires HorizontalPodAutoscalerController
@ -232,12 +224,6 @@ type HorizontalPodAutoscalerControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v2beta2a.HorizontalPodAutoscalerLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -309,18 +295,6 @@ type HorizontalPodAutoscalerControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -648,72 +622,6 @@ func (mock *HorizontalPodAutoscalerControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *HorizontalPodAutoscalerControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("HorizontalPodAutoscalerControllerMock.StartFunc: method is nil but HorizontalPodAutoscalerController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockHorizontalPodAutoscalerControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockHorizontalPodAutoscalerControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedHorizontalPodAutoscalerController.StartCalls())
func (mock *HorizontalPodAutoscalerControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockHorizontalPodAutoscalerControllerMockStart.RLock()
calls = mock.calls.Start
lockHorizontalPodAutoscalerControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *HorizontalPodAutoscalerControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("HorizontalPodAutoscalerControllerMock.SyncFunc: method is nil but HorizontalPodAutoscalerController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockHorizontalPodAutoscalerControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockHorizontalPodAutoscalerControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedHorizontalPodAutoscalerController.SyncCalls())
func (mock *HorizontalPodAutoscalerControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockHorizontalPodAutoscalerControllerMockSync.RLock()
calls = mock.calls.Sync
lockHorizontalPodAutoscalerControllerMockSync.RUnlock()
return calls
}
var (
lockHorizontalPodAutoscalerInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockHorizontalPodAutoscalerInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
@ -792,10 +700,10 @@ var _ v2beta2a.HorizontalPodAutoscalerInterface = &HorizontalPodAutoscalerInterf
// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v2beta2.HorizontalPodAutoscaler, error) {
// panic("mock out the GetNamespaced method")
// },
// ListFunc: func(opts v1.ListOptions) (*v2beta2a.HorizontalPodAutoscalerList, error) {
// ListFunc: func(opts v1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error) {
// panic("mock out the List method")
// },
// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v2beta2a.HorizontalPodAutoscalerList, error) {
// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error) {
// panic("mock out the ListNamespaced method")
// },
// ObjectClientFunc: func() *objectclient.ObjectClient {
@ -860,10 +768,10 @@ type HorizontalPodAutoscalerInterfaceMock struct {
GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v2beta2.HorizontalPodAutoscaler, error)
// ListFunc mocks the List method.
ListFunc func(opts v1.ListOptions) (*v2beta2a.HorizontalPodAutoscalerList, error)
ListFunc func(opts v1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error)
// ListNamespacedFunc mocks the ListNamespaced method.
ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v2beta2a.HorizontalPodAutoscalerList, error)
ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error)
// ObjectClientFunc mocks the ObjectClient method.
ObjectClientFunc func() *objectclient.ObjectClient
@ -1624,7 +1532,7 @@ func (mock *HorizontalPodAutoscalerInterfaceMock) GetNamespacedCalls() []struct
}
// List calls ListFunc.
func (mock *HorizontalPodAutoscalerInterfaceMock) List(opts v1.ListOptions) (*v2beta2a.HorizontalPodAutoscalerList, error) {
func (mock *HorizontalPodAutoscalerInterfaceMock) List(opts v1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error) {
if mock.ListFunc == nil {
panic("HorizontalPodAutoscalerInterfaceMock.ListFunc: method is nil but HorizontalPodAutoscalerInterface.List was just called")
}
@ -1655,7 +1563,7 @@ func (mock *HorizontalPodAutoscalerInterfaceMock) ListCalls() []struct {
}
// ListNamespaced calls ListNamespacedFunc.
func (mock *HorizontalPodAutoscalerInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v2beta2a.HorizontalPodAutoscalerList, error) {
func (mock *HorizontalPodAutoscalerInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error) {
if mock.ListNamespacedFunc == nil {
panic("HorizontalPodAutoscalerInterfaceMock.ListNamespacedFunc: method is nil but HorizontalPodAutoscalerInterface.ListNamespaced was just called")
}

View File

@ -1,39 +0,0 @@
package v2beta2
import (
autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2"
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HorizontalPodAutoscalerList) DeepCopyInto(out *HorizontalPodAutoscalerList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]autoscalingv2beta2.HorizontalPodAutoscaler, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HorizontalPodAutoscalerList.
func (in *HorizontalPodAutoscalerList) DeepCopy() *HorizontalPodAutoscalerList {
if in == nil {
return nil
}
out := new(HorizontalPodAutoscalerList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *HorizontalPodAutoscalerList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}

View File

@ -50,12 +50,6 @@ func NewHorizontalPodAutoscaler(namespace, name string, obj v2beta2.HorizontalPo
return &obj
}
type HorizontalPodAutoscalerList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []v2beta2.HorizontalPodAutoscaler `json:"items"`
}
type HorizontalPodAutoscalerHandlerFunc func(key string, obj *v2beta2.HorizontalPodAutoscaler) (runtime.Object, error)
type HorizontalPodAutoscalerChangeHandlerFunc func(obj *v2beta2.HorizontalPodAutoscaler) (runtime.Object, error)
@ -75,8 +69,6 @@ type HorizontalPodAutoscalerController interface {
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler HorizontalPodAutoscalerHandlerFunc)
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, after time.Duration)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type HorizontalPodAutoscalerInterface interface {
@ -87,8 +79,8 @@ type HorizontalPodAutoscalerInterface interface {
Update(*v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*HorizontalPodAutoscalerList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*HorizontalPodAutoscalerList, error)
List(opts metav1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() HorizontalPodAutoscalerController
@ -127,7 +119,7 @@ func (l *horizontalPodAutoscalerLister) Get(namespace, name string) (*v2beta2.Ho
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: HorizontalPodAutoscalerGroupVersionKind.Group,
Resource: "horizontalPodAutoscaler",
Resource: HorizontalPodAutoscalerGroupVersionResource.Resource,
}, key)
}
return obj.(*v2beta2.HorizontalPodAutoscaler), nil
@ -207,29 +199,16 @@ func (c horizontalPodAutoscalerFactory) Object() runtime.Object {
}
func (c horizontalPodAutoscalerFactory) List() runtime.Object {
return &HorizontalPodAutoscalerList{}
return &v2beta2.HorizontalPodAutoscalerList{}
}
func (s *horizontalPodAutoscalerClient) Controller() HorizontalPodAutoscalerController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.horizontalPodAutoscalerControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(HorizontalPodAutoscalerGroupVersionKind.Kind+"Controller",
s.objectClient)
s.client.controllerFactory.ForResourceKind(HorizontalPodAutoscalerGroupVersionResource, HorizontalPodAutoscalerGroupVersionKind.Kind, true))
c = &horizontalPodAutoscalerController{
return &horizontalPodAutoscalerController{
GenericController: genericController,
}
s.client.horizontalPodAutoscalerControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type horizontalPodAutoscalerClient struct {
@ -263,6 +242,11 @@ func (s *horizontalPodAutoscalerClient) Update(o *v2beta2.HorizontalPodAutoscale
return obj.(*v2beta2.HorizontalPodAutoscaler), err
}
func (s *horizontalPodAutoscalerClient) UpdateStatus(o *v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error) {
obj, err := s.objectClient.UpdateStatus(o.Name, o)
return obj.(*v2beta2.HorizontalPodAutoscaler), err
}
func (s *horizontalPodAutoscalerClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
@ -271,14 +255,14 @@ func (s *horizontalPodAutoscalerClient) DeleteNamespaced(namespace, name string,
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *horizontalPodAutoscalerClient) List(opts metav1.ListOptions) (*HorizontalPodAutoscalerList, error) {
func (s *horizontalPodAutoscalerClient) List(opts metav1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*HorizontalPodAutoscalerList), err
return obj.(*v2beta2.HorizontalPodAutoscalerList), err
}
func (s *horizontalPodAutoscalerClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*HorizontalPodAutoscalerList, error) {
func (s *horizontalPodAutoscalerClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error) {
obj, err := s.objectClient.ListNamespaced(namespace, opts)
return obj.(*HorizontalPodAutoscalerList), err
return obj.(*v2beta2.HorizontalPodAutoscalerList), err
}
func (s *horizontalPodAutoscalerClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {

View File

@ -1,71 +1,34 @@
package v2beta2
import (
"context"
"sync"
"github.com/rancher/norman/controller"
"github.com/rancher/lasso/pkg/client"
"github.com/rancher/lasso/pkg/controller"
"github.com/rancher/norman/objectclient"
"github.com/rancher/norman/objectclient/dynamic"
"github.com/rancher/norman/restwatch"
"k8s.io/client-go/rest"
)
type (
contextKeyType struct{}
contextClientsKeyType struct{}
)
type Interface interface {
RESTClient() rest.Interface
controller.Starter
HorizontalPodAutoscalersGetter
}
type Client struct {
sync.Mutex
restClient rest.Interface
starters []controller.Starter
horizontalPodAutoscalerControllers map[string]HorizontalPodAutoscalerController
controllerFactory controller.SharedControllerFactory
clientFactory client.SharedClientFactory
}
func NewForConfig(config rest.Config) (Interface, error) {
if config.NegotiatedSerializer == nil {
config.NegotiatedSerializer = dynamic.NegotiatedSerializer
}
restClient, err := restwatch.UnversionedRESTClientFor(&config)
if err != nil {
return nil, err
}
func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) {
return &Client{
restClient: restClient,
horizontalPodAutoscalerControllers: map[string]HorizontalPodAutoscalerController{},
controllerFactory: factory,
clientFactory: factory.SharedCacheFactory().SharedClientFactory(),
}, nil
}
func (c *Client) RESTClient() rest.Interface {
return c.restClient
}
func (c *Client) Sync(ctx context.Context) error {
return controller.Sync(ctx, c.starters...)
}
func (c *Client) Start(ctx context.Context, threadiness int) error {
return controller.Start(ctx, threadiness, c.starters...)
}
type HorizontalPodAutoscalersGetter interface {
HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface
}
func (c *Client) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface {
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &HorizontalPodAutoscalerResource, HorizontalPodAutoscalerGroupVersionKind, horizontalPodAutoscalerFactory{})
sharedClient := c.clientFactory.ForResourceKind(HorizontalPodAutoscalerGroupVersionResource, HorizontalPodAutoscalerGroupVersionKind.Kind, true)
objectClient := objectclient.NewObjectClient(namespace, sharedClient, &HorizontalPodAutoscalerResource, HorizontalPodAutoscalerGroupVersionKind, horizontalPodAutoscalerFactory{})
return &horizontalPodAutoscalerClient{
ns: namespace,
client: c,

View File

@ -1,8 +1,6 @@
package v2beta2
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
@ -23,19 +21,3 @@ func Kind(kind string) schema.GroupKind {
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
var (
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
AddToScheme = SchemeBuilder.AddToScheme
)
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
// TODO this gets cleaned up when the types are fixed
scheme.AddKnownTypes(SchemeGroupVersion,
&HorizontalPodAutoscalerList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}

View File

@ -151,8 +151,6 @@ var (
lockJobControllerMockGeneric sync.RWMutex
lockJobControllerMockInformer sync.RWMutex
lockJobControllerMockLister sync.RWMutex
lockJobControllerMockStart sync.RWMutex
lockJobControllerMockSync sync.RWMutex
)
// Ensure, that JobControllerMock does implement JobController.
@ -192,12 +190,6 @@ var _ v1a.JobController = &JobControllerMock{}
// ListerFunc: func() v1a.JobLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedJobController in code that requires JobController
@ -232,12 +224,6 @@ type JobControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v1a.JobLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -309,18 +295,6 @@ type JobControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -648,72 +622,6 @@ func (mock *JobControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *JobControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("JobControllerMock.StartFunc: method is nil but JobController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockJobControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockJobControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedJobController.StartCalls())
func (mock *JobControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockJobControllerMockStart.RLock()
calls = mock.calls.Start
lockJobControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *JobControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("JobControllerMock.SyncFunc: method is nil but JobController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockJobControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockJobControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedJobController.SyncCalls())
func (mock *JobControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockJobControllerMockSync.RLock()
calls = mock.calls.Sync
lockJobControllerMockSync.RUnlock()
return calls
}
var (
lockJobInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockJobInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
@ -792,10 +700,10 @@ var _ v1a.JobInterface = &JobInterfaceMock{}
// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Job, error) {
// panic("mock out the GetNamespaced method")
// },
// ListFunc: func(opts v1b.ListOptions) (*v1a.JobList, error) {
// ListFunc: func(opts v1b.ListOptions) (*v1.JobList, error) {
// panic("mock out the List method")
// },
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.JobList, error) {
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.JobList, error) {
// panic("mock out the ListNamespaced method")
// },
// ObjectClientFunc: func() *objectclient.ObjectClient {
@ -860,10 +768,10 @@ type JobInterfaceMock struct {
GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Job, error)
// ListFunc mocks the List method.
ListFunc func(opts v1b.ListOptions) (*v1a.JobList, error)
ListFunc func(opts v1b.ListOptions) (*v1.JobList, error)
// ListNamespacedFunc mocks the ListNamespaced method.
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.JobList, error)
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.JobList, error)
// ObjectClientFunc mocks the ObjectClient method.
ObjectClientFunc func() *objectclient.ObjectClient
@ -1624,7 +1532,7 @@ func (mock *JobInterfaceMock) GetNamespacedCalls() []struct {
}
// List calls ListFunc.
func (mock *JobInterfaceMock) List(opts v1b.ListOptions) (*v1a.JobList, error) {
func (mock *JobInterfaceMock) List(opts v1b.ListOptions) (*v1.JobList, error) {
if mock.ListFunc == nil {
panic("JobInterfaceMock.ListFunc: method is nil but JobInterface.List was just called")
}
@ -1655,7 +1563,7 @@ func (mock *JobInterfaceMock) ListCalls() []struct {
}
// ListNamespaced calls ListNamespacedFunc.
func (mock *JobInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.JobList, error) {
func (mock *JobInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.JobList, error) {
if mock.ListNamespacedFunc == nil {
panic("JobInterfaceMock.ListNamespacedFunc: method is nil but JobInterface.ListNamespaced was just called")
}

View File

@ -1,39 +0,0 @@
package v1
import (
batchv1 "k8s.io/api/batch/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *JobList) DeepCopyInto(out *JobList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]batchv1.Job, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobList.
func (in *JobList) DeepCopy() *JobList {
if in == nil {
return nil
}
out := new(JobList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *JobList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}

View File

@ -50,12 +50,6 @@ func NewJob(namespace, name string, obj v1.Job) *v1.Job {
return &obj
}
type JobList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []v1.Job `json:"items"`
}
type JobHandlerFunc func(key string, obj *v1.Job) (runtime.Object, error)
type JobChangeHandlerFunc func(obj *v1.Job) (runtime.Object, error)
@ -75,8 +69,6 @@ type JobController interface {
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler JobHandlerFunc)
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, after time.Duration)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type JobInterface interface {
@ -87,8 +79,8 @@ type JobInterface interface {
Update(*v1.Job) (*v1.Job, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*JobList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*JobList, error)
List(opts metav1.ListOptions) (*v1.JobList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.JobList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() JobController
@ -127,7 +119,7 @@ func (l *jobLister) Get(namespace, name string) (*v1.Job, error) {
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: JobGroupVersionKind.Group,
Resource: "job",
Resource: JobGroupVersionResource.Resource,
}, key)
}
return obj.(*v1.Job), nil
@ -207,29 +199,16 @@ func (c jobFactory) Object() runtime.Object {
}
func (c jobFactory) List() runtime.Object {
return &JobList{}
return &v1.JobList{}
}
func (s *jobClient) Controller() JobController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.jobControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(JobGroupVersionKind.Kind+"Controller",
s.objectClient)
s.client.controllerFactory.ForResourceKind(JobGroupVersionResource, JobGroupVersionKind.Kind, true))
c = &jobController{
return &jobController{
GenericController: genericController,
}
s.client.jobControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type jobClient struct {
@ -263,6 +242,11 @@ func (s *jobClient) Update(o *v1.Job) (*v1.Job, error) {
return obj.(*v1.Job), err
}
func (s *jobClient) UpdateStatus(o *v1.Job) (*v1.Job, error) {
obj, err := s.objectClient.UpdateStatus(o.Name, o)
return obj.(*v1.Job), err
}
func (s *jobClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
@ -271,14 +255,14 @@ func (s *jobClient) DeleteNamespaced(namespace, name string, options *metav1.Del
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *jobClient) List(opts metav1.ListOptions) (*JobList, error) {
func (s *jobClient) List(opts metav1.ListOptions) (*v1.JobList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*JobList), err
return obj.(*v1.JobList), err
}
func (s *jobClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*JobList, error) {
func (s *jobClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.JobList, error) {
obj, err := s.objectClient.ListNamespaced(namespace, opts)
return obj.(*JobList), err
return obj.(*v1.JobList), err
}
func (s *jobClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {

View File

@ -1,71 +1,34 @@
package v1
import (
"context"
"sync"
"github.com/rancher/norman/controller"
"github.com/rancher/lasso/pkg/client"
"github.com/rancher/lasso/pkg/controller"
"github.com/rancher/norman/objectclient"
"github.com/rancher/norman/objectclient/dynamic"
"github.com/rancher/norman/restwatch"
"k8s.io/client-go/rest"
)
type (
contextKeyType struct{}
contextClientsKeyType struct{}
)
type Interface interface {
RESTClient() rest.Interface
controller.Starter
JobsGetter
}
type Client struct {
sync.Mutex
restClient rest.Interface
starters []controller.Starter
jobControllers map[string]JobController
controllerFactory controller.SharedControllerFactory
clientFactory client.SharedClientFactory
}
func NewForConfig(config rest.Config) (Interface, error) {
if config.NegotiatedSerializer == nil {
config.NegotiatedSerializer = dynamic.NegotiatedSerializer
}
restClient, err := restwatch.UnversionedRESTClientFor(&config)
if err != nil {
return nil, err
}
func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) {
return &Client{
restClient: restClient,
jobControllers: map[string]JobController{},
controllerFactory: factory,
clientFactory: factory.SharedCacheFactory().SharedClientFactory(),
}, nil
}
func (c *Client) RESTClient() rest.Interface {
return c.restClient
}
func (c *Client) Sync(ctx context.Context) error {
return controller.Sync(ctx, c.starters...)
}
func (c *Client) Start(ctx context.Context, threadiness int) error {
return controller.Start(ctx, threadiness, c.starters...)
}
type JobsGetter interface {
Jobs(namespace string) JobInterface
}
func (c *Client) Jobs(namespace string) JobInterface {
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &JobResource, JobGroupVersionKind, jobFactory{})
sharedClient := c.clientFactory.ForResourceKind(JobGroupVersionResource, JobGroupVersionKind.Kind, true)
objectClient := objectclient.NewObjectClient(namespace, sharedClient, &JobResource, JobGroupVersionKind, jobFactory{})
return &jobClient{
ns: namespace,
client: c,

View File

@ -1,8 +1,6 @@
package v1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
@ -23,19 +21,3 @@ func Kind(kind string) schema.GroupKind {
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
var (
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
AddToScheme = SchemeBuilder.AddToScheme
)
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
// TODO this gets cleaned up when the types are fixed
scheme.AddKnownTypes(SchemeGroupVersion,
&JobList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}

View File

@ -151,8 +151,6 @@ var (
lockCronJobControllerMockGeneric sync.RWMutex
lockCronJobControllerMockInformer sync.RWMutex
lockCronJobControllerMockLister sync.RWMutex
lockCronJobControllerMockStart sync.RWMutex
lockCronJobControllerMockSync sync.RWMutex
)
// Ensure, that CronJobControllerMock does implement CronJobController.
@ -192,12 +190,6 @@ var _ v1beta1a.CronJobController = &CronJobControllerMock{}
// ListerFunc: func() v1beta1a.CronJobLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedCronJobController in code that requires CronJobController
@ -232,12 +224,6 @@ type CronJobControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v1beta1a.CronJobLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -309,18 +295,6 @@ type CronJobControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -648,72 +622,6 @@ func (mock *CronJobControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *CronJobControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("CronJobControllerMock.StartFunc: method is nil but CronJobController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockCronJobControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockCronJobControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedCronJobController.StartCalls())
func (mock *CronJobControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockCronJobControllerMockStart.RLock()
calls = mock.calls.Start
lockCronJobControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *CronJobControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("CronJobControllerMock.SyncFunc: method is nil but CronJobController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockCronJobControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockCronJobControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedCronJobController.SyncCalls())
func (mock *CronJobControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockCronJobControllerMockSync.RLock()
calls = mock.calls.Sync
lockCronJobControllerMockSync.RUnlock()
return calls
}
var (
lockCronJobInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockCronJobInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
@ -792,10 +700,10 @@ var _ v1beta1a.CronJobInterface = &CronJobInterfaceMock{}
// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v1beta1.CronJob, error) {
// panic("mock out the GetNamespaced method")
// },
// ListFunc: func(opts v1.ListOptions) (*v1beta1a.CronJobList, error) {
// ListFunc: func(opts v1.ListOptions) (*v1beta1.CronJobList, error) {
// panic("mock out the List method")
// },
// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v1beta1a.CronJobList, error) {
// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v1beta1.CronJobList, error) {
// panic("mock out the ListNamespaced method")
// },
// ObjectClientFunc: func() *objectclient.ObjectClient {
@ -860,10 +768,10 @@ type CronJobInterfaceMock struct {
GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v1beta1.CronJob, error)
// ListFunc mocks the List method.
ListFunc func(opts v1.ListOptions) (*v1beta1a.CronJobList, error)
ListFunc func(opts v1.ListOptions) (*v1beta1.CronJobList, error)
// ListNamespacedFunc mocks the ListNamespaced method.
ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v1beta1a.CronJobList, error)
ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v1beta1.CronJobList, error)
// ObjectClientFunc mocks the ObjectClient method.
ObjectClientFunc func() *objectclient.ObjectClient
@ -1624,7 +1532,7 @@ func (mock *CronJobInterfaceMock) GetNamespacedCalls() []struct {
}
// List calls ListFunc.
func (mock *CronJobInterfaceMock) List(opts v1.ListOptions) (*v1beta1a.CronJobList, error) {
func (mock *CronJobInterfaceMock) List(opts v1.ListOptions) (*v1beta1.CronJobList, error) {
if mock.ListFunc == nil {
panic("CronJobInterfaceMock.ListFunc: method is nil but CronJobInterface.List was just called")
}
@ -1655,7 +1563,7 @@ func (mock *CronJobInterfaceMock) ListCalls() []struct {
}
// ListNamespaced calls ListNamespacedFunc.
func (mock *CronJobInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v1beta1a.CronJobList, error) {
func (mock *CronJobInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v1beta1.CronJobList, error) {
if mock.ListNamespacedFunc == nil {
panic("CronJobInterfaceMock.ListNamespacedFunc: method is nil but CronJobInterface.ListNamespaced was just called")
}

View File

@ -50,12 +50,6 @@ func NewCronJob(namespace, name string, obj v1beta1.CronJob) *v1beta1.CronJob {
return &obj
}
type CronJobList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []v1beta1.CronJob `json:"items"`
}
type CronJobHandlerFunc func(key string, obj *v1beta1.CronJob) (runtime.Object, error)
type CronJobChangeHandlerFunc func(obj *v1beta1.CronJob) (runtime.Object, error)
@ -75,8 +69,6 @@ type CronJobController interface {
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler CronJobHandlerFunc)
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, after time.Duration)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type CronJobInterface interface {
@ -87,8 +79,8 @@ type CronJobInterface interface {
Update(*v1beta1.CronJob) (*v1beta1.CronJob, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*CronJobList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*CronJobList, error)
List(opts metav1.ListOptions) (*v1beta1.CronJobList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*v1beta1.CronJobList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() CronJobController
@ -127,7 +119,7 @@ func (l *cronJobLister) Get(namespace, name string) (*v1beta1.CronJob, error) {
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: CronJobGroupVersionKind.Group,
Resource: "cronJob",
Resource: CronJobGroupVersionResource.Resource,
}, key)
}
return obj.(*v1beta1.CronJob), nil
@ -207,29 +199,16 @@ func (c cronJobFactory) Object() runtime.Object {
}
func (c cronJobFactory) List() runtime.Object {
return &CronJobList{}
return &v1beta1.CronJobList{}
}
func (s *cronJobClient) Controller() CronJobController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.cronJobControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(CronJobGroupVersionKind.Kind+"Controller",
s.objectClient)
s.client.controllerFactory.ForResourceKind(CronJobGroupVersionResource, CronJobGroupVersionKind.Kind, true))
c = &cronJobController{
return &cronJobController{
GenericController: genericController,
}
s.client.cronJobControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type cronJobClient struct {
@ -263,6 +242,11 @@ func (s *cronJobClient) Update(o *v1beta1.CronJob) (*v1beta1.CronJob, error) {
return obj.(*v1beta1.CronJob), err
}
func (s *cronJobClient) UpdateStatus(o *v1beta1.CronJob) (*v1beta1.CronJob, error) {
obj, err := s.objectClient.UpdateStatus(o.Name, o)
return obj.(*v1beta1.CronJob), err
}
func (s *cronJobClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
@ -271,14 +255,14 @@ func (s *cronJobClient) DeleteNamespaced(namespace, name string, options *metav1
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *cronJobClient) List(opts metav1.ListOptions) (*CronJobList, error) {
func (s *cronJobClient) List(opts metav1.ListOptions) (*v1beta1.CronJobList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*CronJobList), err
return obj.(*v1beta1.CronJobList), err
}
func (s *cronJobClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*CronJobList, error) {
func (s *cronJobClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1beta1.CronJobList, error) {
obj, err := s.objectClient.ListNamespaced(namespace, opts)
return obj.(*CronJobList), err
return obj.(*v1beta1.CronJobList), err
}
func (s *cronJobClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {

View File

@ -1,39 +0,0 @@
package v1beta1
import (
batchv1beta1 "k8s.io/api/batch/v1beta1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *CronJobList) DeepCopyInto(out *CronJobList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]batchv1beta1.CronJob, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronJobList.
func (in *CronJobList) DeepCopy() *CronJobList {
if in == nil {
return nil
}
out := new(CronJobList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *CronJobList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}

View File

@ -1,71 +1,34 @@
package v1beta1
import (
"context"
"sync"
"github.com/rancher/norman/controller"
"github.com/rancher/lasso/pkg/client"
"github.com/rancher/lasso/pkg/controller"
"github.com/rancher/norman/objectclient"
"github.com/rancher/norman/objectclient/dynamic"
"github.com/rancher/norman/restwatch"
"k8s.io/client-go/rest"
)
type (
contextKeyType struct{}
contextClientsKeyType struct{}
)
type Interface interface {
RESTClient() rest.Interface
controller.Starter
CronJobsGetter
}
type Client struct {
sync.Mutex
restClient rest.Interface
starters []controller.Starter
cronJobControllers map[string]CronJobController
controllerFactory controller.SharedControllerFactory
clientFactory client.SharedClientFactory
}
func NewForConfig(config rest.Config) (Interface, error) {
if config.NegotiatedSerializer == nil {
config.NegotiatedSerializer = dynamic.NegotiatedSerializer
}
restClient, err := restwatch.UnversionedRESTClientFor(&config)
if err != nil {
return nil, err
}
func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) {
return &Client{
restClient: restClient,
cronJobControllers: map[string]CronJobController{},
controllerFactory: factory,
clientFactory: factory.SharedCacheFactory().SharedClientFactory(),
}, nil
}
func (c *Client) RESTClient() rest.Interface {
return c.restClient
}
func (c *Client) Sync(ctx context.Context) error {
return controller.Sync(ctx, c.starters...)
}
func (c *Client) Start(ctx context.Context, threadiness int) error {
return controller.Start(ctx, threadiness, c.starters...)
}
type CronJobsGetter interface {
CronJobs(namespace string) CronJobInterface
}
func (c *Client) CronJobs(namespace string) CronJobInterface {
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &CronJobResource, CronJobGroupVersionKind, cronJobFactory{})
sharedClient := c.clientFactory.ForResourceKind(CronJobGroupVersionResource, CronJobGroupVersionKind.Kind, true)
objectClient := objectclient.NewObjectClient(namespace, sharedClient, &CronJobResource, CronJobGroupVersionKind, cronJobFactory{})
return &cronJobClient{
ns: namespace,
client: c,

View File

@ -1,8 +1,6 @@
package v1beta1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
@ -23,19 +21,3 @@ func Kind(kind string) schema.GroupKind {
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
var (
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
AddToScheme = SchemeBuilder.AddToScheme
)
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
// TODO this gets cleaned up when the types are fixed
scheme.AddKnownTypes(SchemeGroupVersion,
&CronJobList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}

View File

@ -150,8 +150,6 @@ var (
lockClusterAuthTokenControllerMockGeneric sync.RWMutex
lockClusterAuthTokenControllerMockInformer sync.RWMutex
lockClusterAuthTokenControllerMockLister sync.RWMutex
lockClusterAuthTokenControllerMockStart sync.RWMutex
lockClusterAuthTokenControllerMockSync sync.RWMutex
)
// Ensure, that ClusterAuthTokenControllerMock does implement ClusterAuthTokenController.
@ -191,12 +189,6 @@ var _ v3.ClusterAuthTokenController = &ClusterAuthTokenControllerMock{}
// ListerFunc: func() v3.ClusterAuthTokenLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedClusterAuthTokenController in code that requires ClusterAuthTokenController
@ -231,12 +223,6 @@ type ClusterAuthTokenControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.ClusterAuthTokenLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type ClusterAuthTokenControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *ClusterAuthTokenControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *ClusterAuthTokenControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("ClusterAuthTokenControllerMock.StartFunc: method is nil but ClusterAuthTokenController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockClusterAuthTokenControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockClusterAuthTokenControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedClusterAuthTokenController.StartCalls())
func (mock *ClusterAuthTokenControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockClusterAuthTokenControllerMockStart.RLock()
calls = mock.calls.Start
lockClusterAuthTokenControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *ClusterAuthTokenControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("ClusterAuthTokenControllerMock.SyncFunc: method is nil but ClusterAuthTokenController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockClusterAuthTokenControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockClusterAuthTokenControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedClusterAuthTokenController.SyncCalls())
func (mock *ClusterAuthTokenControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockClusterAuthTokenControllerMockSync.RLock()
calls = mock.calls.Sync
lockClusterAuthTokenControllerMockSync.RUnlock()
return calls
}
var (
lockClusterAuthTokenInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockClusterAuthTokenInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockClusterUserAttributeControllerMockGeneric sync.RWMutex
lockClusterUserAttributeControllerMockInformer sync.RWMutex
lockClusterUserAttributeControllerMockLister sync.RWMutex
lockClusterUserAttributeControllerMockStart sync.RWMutex
lockClusterUserAttributeControllerMockSync sync.RWMutex
)
// Ensure, that ClusterUserAttributeControllerMock does implement ClusterUserAttributeController.
@ -191,12 +189,6 @@ var _ v3.ClusterUserAttributeController = &ClusterUserAttributeControllerMock{}
// ListerFunc: func() v3.ClusterUserAttributeLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedClusterUserAttributeController in code that requires ClusterUserAttributeController
@ -231,12 +223,6 @@ type ClusterUserAttributeControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.ClusterUserAttributeLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type ClusterUserAttributeControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *ClusterUserAttributeControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *ClusterUserAttributeControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("ClusterUserAttributeControllerMock.StartFunc: method is nil but ClusterUserAttributeController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockClusterUserAttributeControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockClusterUserAttributeControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedClusterUserAttributeController.StartCalls())
func (mock *ClusterUserAttributeControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockClusterUserAttributeControllerMockStart.RLock()
calls = mock.calls.Start
lockClusterUserAttributeControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *ClusterUserAttributeControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("ClusterUserAttributeControllerMock.SyncFunc: method is nil but ClusterUserAttributeController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockClusterUserAttributeControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockClusterUserAttributeControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedClusterUserAttributeController.SyncCalls())
func (mock *ClusterUserAttributeControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockClusterUserAttributeControllerMockSync.RLock()
calls = mock.calls.Sync
lockClusterUserAttributeControllerMockSync.RUnlock()
return calls
}
var (
lockClusterUserAttributeInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockClusterUserAttributeInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -74,8 +74,6 @@ type ClusterAuthTokenController interface {
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterAuthTokenHandlerFunc)
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, after time.Duration)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type ClusterAuthTokenInterface interface {
@ -126,7 +124,7 @@ func (l *clusterAuthTokenLister) Get(namespace, name string) (*ClusterAuthToken,
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: ClusterAuthTokenGroupVersionKind.Group,
Resource: "clusterAuthToken",
Resource: ClusterAuthTokenGroupVersionResource.Resource,
}, key)
}
return obj.(*ClusterAuthToken), nil
@ -210,25 +208,12 @@ func (c clusterAuthTokenFactory) List() runtime.Object {
}
func (s *clusterAuthTokenClient) Controller() ClusterAuthTokenController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.clusterAuthTokenControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(ClusterAuthTokenGroupVersionKind.Kind+"Controller",
s.objectClient)
s.client.controllerFactory.ForResourceKind(ClusterAuthTokenGroupVersionResource, ClusterAuthTokenGroupVersionKind.Kind, true))
c = &clusterAuthTokenController{
return &clusterAuthTokenController{
GenericController: genericController,
}
s.client.clusterAuthTokenControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type clusterAuthTokenClient struct {
@ -262,6 +247,11 @@ func (s *clusterAuthTokenClient) Update(o *ClusterAuthToken) (*ClusterAuthToken,
return obj.(*ClusterAuthToken), err
}
func (s *clusterAuthTokenClient) UpdateStatus(o *ClusterAuthToken) (*ClusterAuthToken, error) {
obj, err := s.objectClient.UpdateStatus(o.Name, o)
return obj.(*ClusterAuthToken), err
}
func (s *clusterAuthTokenClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}

View File

@ -74,8 +74,6 @@ type ClusterUserAttributeController interface {
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterUserAttributeHandlerFunc)
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, after time.Duration)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type ClusterUserAttributeInterface interface {
@ -126,7 +124,7 @@ func (l *clusterUserAttributeLister) Get(namespace, name string) (*ClusterUserAt
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: ClusterUserAttributeGroupVersionKind.Group,
Resource: "clusterUserAttribute",
Resource: ClusterUserAttributeGroupVersionResource.Resource,
}, key)
}
return obj.(*ClusterUserAttribute), nil
@ -210,25 +208,12 @@ func (c clusterUserAttributeFactory) List() runtime.Object {
}
func (s *clusterUserAttributeClient) Controller() ClusterUserAttributeController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.clusterUserAttributeControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(ClusterUserAttributeGroupVersionKind.Kind+"Controller",
s.objectClient)
s.client.controllerFactory.ForResourceKind(ClusterUserAttributeGroupVersionResource, ClusterUserAttributeGroupVersionKind.Kind, true))
c = &clusterUserAttributeController{
return &clusterUserAttributeController{
GenericController: genericController,
}
s.client.clusterUserAttributeControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type clusterUserAttributeClient struct {
@ -262,6 +247,11 @@ func (s *clusterUserAttributeClient) Update(o *ClusterUserAttribute) (*ClusterUs
return obj.(*ClusterUserAttribute), err
}
func (s *clusterUserAttributeClient) UpdateStatus(o *ClusterUserAttribute) (*ClusterUserAttribute, error) {
obj, err := s.objectClient.UpdateStatus(o.Name, o)
return obj.(*ClusterUserAttribute), err
}
func (s *clusterUserAttributeClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}

View File

@ -1,74 +1,49 @@
package v3
import (
"context"
"sync"
"github.com/rancher/norman/controller"
"github.com/rancher/lasso/pkg/client"
"github.com/rancher/lasso/pkg/controller"
"github.com/rancher/norman/objectclient"
"github.com/rancher/norman/objectclient/dynamic"
"github.com/rancher/norman/restwatch"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/rest"
)
type (
contextKeyType struct{}
contextClientsKeyType struct{}
)
type Interface interface {
RESTClient() rest.Interface
controller.Starter
ClusterAuthTokensGetter
ClusterUserAttributesGetter
}
type Client struct {
sync.Mutex
restClient rest.Interface
starters []controller.Starter
clusterAuthTokenControllers map[string]ClusterAuthTokenController
clusterUserAttributeControllers map[string]ClusterUserAttributeController
controllerFactory controller.SharedControllerFactory
clientFactory client.SharedClientFactory
}
func NewForConfig(config rest.Config) (Interface, error) {
if config.NegotiatedSerializer == nil {
config.NegotiatedSerializer = dynamic.NegotiatedSerializer
func NewForConfig(cfg rest.Config) (Interface, error) {
scheme := runtime.NewScheme()
if err := AddToScheme(scheme); err != nil {
return nil, err
}
restClient, err := restwatch.UnversionedRESTClientFor(&config)
controllerFactory, err := controller.NewSharedControllerFactoryFromConfig(&cfg, scheme)
if err != nil {
return nil, err
}
return NewFromControllerFactory(controllerFactory)
}
func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) {
return &Client{
restClient: restClient,
clusterAuthTokenControllers: map[string]ClusterAuthTokenController{},
clusterUserAttributeControllers: map[string]ClusterUserAttributeController{},
controllerFactory: factory,
clientFactory: factory.SharedCacheFactory().SharedClientFactory(),
}, nil
}
func (c *Client) RESTClient() rest.Interface {
return c.restClient
}
func (c *Client) Sync(ctx context.Context) error {
return controller.Sync(ctx, c.starters...)
}
func (c *Client) Start(ctx context.Context, threadiness int) error {
return controller.Start(ctx, threadiness, c.starters...)
}
type ClusterAuthTokensGetter interface {
ClusterAuthTokens(namespace string) ClusterAuthTokenInterface
}
func (c *Client) ClusterAuthTokens(namespace string) ClusterAuthTokenInterface {
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterAuthTokenResource, ClusterAuthTokenGroupVersionKind, clusterAuthTokenFactory{})
sharedClient := c.clientFactory.ForResourceKind(ClusterAuthTokenGroupVersionResource, ClusterAuthTokenGroupVersionKind.Kind, true)
objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterAuthTokenResource, ClusterAuthTokenGroupVersionKind, clusterAuthTokenFactory{})
return &clusterAuthTokenClient{
ns: namespace,
client: c,
@ -81,7 +56,8 @@ type ClusterUserAttributesGetter interface {
}
func (c *Client) ClusterUserAttributes(namespace string) ClusterUserAttributeInterface {
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterUserAttributeResource, ClusterUserAttributeGroupVersionKind, clusterUserAttributeFactory{})
sharedClient := c.clientFactory.ForResourceKind(ClusterUserAttributeGroupVersionResource, ClusterUserAttributeGroupVersionKind.Kind, true)
objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterUserAttributeResource, ClusterUserAttributeGroupVersionKind, clusterUserAttributeFactory{})
return &clusterUserAttributeClient{
ns: namespace,
client: c,

View File

@ -35,7 +35,9 @@ func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&ClusterAuthToken{},
&ClusterAuthTokenList{},
&ClusterUserAttribute{},
&ClusterUserAttributeList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil

View File

@ -151,8 +151,6 @@ var (
lockComponentStatusControllerMockGeneric sync.RWMutex
lockComponentStatusControllerMockInformer sync.RWMutex
lockComponentStatusControllerMockLister sync.RWMutex
lockComponentStatusControllerMockStart sync.RWMutex
lockComponentStatusControllerMockSync sync.RWMutex
)
// Ensure, that ComponentStatusControllerMock does implement ComponentStatusController.
@ -192,12 +190,6 @@ var _ v1a.ComponentStatusController = &ComponentStatusControllerMock{}
// ListerFunc: func() v1a.ComponentStatusLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedComponentStatusController in code that requires ComponentStatusController
@ -232,12 +224,6 @@ type ComponentStatusControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v1a.ComponentStatusLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -309,18 +295,6 @@ type ComponentStatusControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -648,72 +622,6 @@ func (mock *ComponentStatusControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *ComponentStatusControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("ComponentStatusControllerMock.StartFunc: method is nil but ComponentStatusController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockComponentStatusControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockComponentStatusControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedComponentStatusController.StartCalls())
func (mock *ComponentStatusControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockComponentStatusControllerMockStart.RLock()
calls = mock.calls.Start
lockComponentStatusControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *ComponentStatusControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("ComponentStatusControllerMock.SyncFunc: method is nil but ComponentStatusController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockComponentStatusControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockComponentStatusControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedComponentStatusController.SyncCalls())
func (mock *ComponentStatusControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockComponentStatusControllerMockSync.RLock()
calls = mock.calls.Sync
lockComponentStatusControllerMockSync.RUnlock()
return calls
}
var (
lockComponentStatusInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockComponentStatusInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
@ -792,10 +700,10 @@ var _ v1a.ComponentStatusInterface = &ComponentStatusInterfaceMock{}
// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.ComponentStatus, error) {
// panic("mock out the GetNamespaced method")
// },
// ListFunc: func(opts v1b.ListOptions) (*v1a.ComponentStatusList, error) {
// ListFunc: func(opts v1b.ListOptions) (*v1.ComponentStatusList, error) {
// panic("mock out the List method")
// },
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.ComponentStatusList, error) {
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.ComponentStatusList, error) {
// panic("mock out the ListNamespaced method")
// },
// ObjectClientFunc: func() *objectclient.ObjectClient {
@ -860,10 +768,10 @@ type ComponentStatusInterfaceMock struct {
GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.ComponentStatus, error)
// ListFunc mocks the List method.
ListFunc func(opts v1b.ListOptions) (*v1a.ComponentStatusList, error)
ListFunc func(opts v1b.ListOptions) (*v1.ComponentStatusList, error)
// ListNamespacedFunc mocks the ListNamespaced method.
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.ComponentStatusList, error)
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.ComponentStatusList, error)
// ObjectClientFunc mocks the ObjectClient method.
ObjectClientFunc func() *objectclient.ObjectClient
@ -1624,7 +1532,7 @@ func (mock *ComponentStatusInterfaceMock) GetNamespacedCalls() []struct {
}
// List calls ListFunc.
func (mock *ComponentStatusInterfaceMock) List(opts v1b.ListOptions) (*v1a.ComponentStatusList, error) {
func (mock *ComponentStatusInterfaceMock) List(opts v1b.ListOptions) (*v1.ComponentStatusList, error) {
if mock.ListFunc == nil {
panic("ComponentStatusInterfaceMock.ListFunc: method is nil but ComponentStatusInterface.List was just called")
}
@ -1655,7 +1563,7 @@ func (mock *ComponentStatusInterfaceMock) ListCalls() []struct {
}
// ListNamespaced calls ListNamespacedFunc.
func (mock *ComponentStatusInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.ComponentStatusList, error) {
func (mock *ComponentStatusInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.ComponentStatusList, error) {
if mock.ListNamespacedFunc == nil {
panic("ComponentStatusInterfaceMock.ListNamespacedFunc: method is nil but ComponentStatusInterface.ListNamespaced was just called")
}

View File

@ -151,8 +151,6 @@ var (
lockConfigMapControllerMockGeneric sync.RWMutex
lockConfigMapControllerMockInformer sync.RWMutex
lockConfigMapControllerMockLister sync.RWMutex
lockConfigMapControllerMockStart sync.RWMutex
lockConfigMapControllerMockSync sync.RWMutex
)
// Ensure, that ConfigMapControllerMock does implement ConfigMapController.
@ -192,12 +190,6 @@ var _ v1a.ConfigMapController = &ConfigMapControllerMock{}
// ListerFunc: func() v1a.ConfigMapLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedConfigMapController in code that requires ConfigMapController
@ -232,12 +224,6 @@ type ConfigMapControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v1a.ConfigMapLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -309,18 +295,6 @@ type ConfigMapControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -648,72 +622,6 @@ func (mock *ConfigMapControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *ConfigMapControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("ConfigMapControllerMock.StartFunc: method is nil but ConfigMapController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockConfigMapControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockConfigMapControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedConfigMapController.StartCalls())
func (mock *ConfigMapControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockConfigMapControllerMockStart.RLock()
calls = mock.calls.Start
lockConfigMapControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *ConfigMapControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("ConfigMapControllerMock.SyncFunc: method is nil but ConfigMapController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockConfigMapControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockConfigMapControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedConfigMapController.SyncCalls())
func (mock *ConfigMapControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockConfigMapControllerMockSync.RLock()
calls = mock.calls.Sync
lockConfigMapControllerMockSync.RUnlock()
return calls
}
var (
lockConfigMapInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockConfigMapInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
@ -792,10 +700,10 @@ var _ v1a.ConfigMapInterface = &ConfigMapInterfaceMock{}
// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.ConfigMap, error) {
// panic("mock out the GetNamespaced method")
// },
// ListFunc: func(opts v1b.ListOptions) (*v1a.ConfigMapList, error) {
// ListFunc: func(opts v1b.ListOptions) (*v1.ConfigMapList, error) {
// panic("mock out the List method")
// },
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.ConfigMapList, error) {
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.ConfigMapList, error) {
// panic("mock out the ListNamespaced method")
// },
// ObjectClientFunc: func() *objectclient.ObjectClient {
@ -860,10 +768,10 @@ type ConfigMapInterfaceMock struct {
GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.ConfigMap, error)
// ListFunc mocks the List method.
ListFunc func(opts v1b.ListOptions) (*v1a.ConfigMapList, error)
ListFunc func(opts v1b.ListOptions) (*v1.ConfigMapList, error)
// ListNamespacedFunc mocks the ListNamespaced method.
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.ConfigMapList, error)
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.ConfigMapList, error)
// ObjectClientFunc mocks the ObjectClient method.
ObjectClientFunc func() *objectclient.ObjectClient
@ -1624,7 +1532,7 @@ func (mock *ConfigMapInterfaceMock) GetNamespacedCalls() []struct {
}
// List calls ListFunc.
func (mock *ConfigMapInterfaceMock) List(opts v1b.ListOptions) (*v1a.ConfigMapList, error) {
func (mock *ConfigMapInterfaceMock) List(opts v1b.ListOptions) (*v1.ConfigMapList, error) {
if mock.ListFunc == nil {
panic("ConfigMapInterfaceMock.ListFunc: method is nil but ConfigMapInterface.List was just called")
}
@ -1655,7 +1563,7 @@ func (mock *ConfigMapInterfaceMock) ListCalls() []struct {
}
// ListNamespaced calls ListNamespacedFunc.
func (mock *ConfigMapInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.ConfigMapList, error) {
func (mock *ConfigMapInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.ConfigMapList, error) {
if mock.ListNamespacedFunc == nil {
panic("ConfigMapInterfaceMock.ListNamespacedFunc: method is nil but ConfigMapInterface.ListNamespaced was just called")
}

View File

@ -151,8 +151,6 @@ var (
lockEndpointsControllerMockGeneric sync.RWMutex
lockEndpointsControllerMockInformer sync.RWMutex
lockEndpointsControllerMockLister sync.RWMutex
lockEndpointsControllerMockStart sync.RWMutex
lockEndpointsControllerMockSync sync.RWMutex
)
// Ensure, that EndpointsControllerMock does implement EndpointsController.
@ -192,12 +190,6 @@ var _ v1a.EndpointsController = &EndpointsControllerMock{}
// ListerFunc: func() v1a.EndpointsLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedEndpointsController in code that requires EndpointsController
@ -232,12 +224,6 @@ type EndpointsControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v1a.EndpointsLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -309,18 +295,6 @@ type EndpointsControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -648,72 +622,6 @@ func (mock *EndpointsControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *EndpointsControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("EndpointsControllerMock.StartFunc: method is nil but EndpointsController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockEndpointsControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockEndpointsControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedEndpointsController.StartCalls())
func (mock *EndpointsControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockEndpointsControllerMockStart.RLock()
calls = mock.calls.Start
lockEndpointsControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *EndpointsControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("EndpointsControllerMock.SyncFunc: method is nil but EndpointsController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockEndpointsControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockEndpointsControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedEndpointsController.SyncCalls())
func (mock *EndpointsControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockEndpointsControllerMockSync.RLock()
calls = mock.calls.Sync
lockEndpointsControllerMockSync.RUnlock()
return calls
}
var (
lockEndpointsInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockEndpointsInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
@ -792,10 +700,10 @@ var _ v1a.EndpointsInterface = &EndpointsInterfaceMock{}
// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Endpoints, error) {
// panic("mock out the GetNamespaced method")
// },
// ListFunc: func(opts v1b.ListOptions) (*v1a.EndpointsList, error) {
// ListFunc: func(opts v1b.ListOptions) (*v1.EndpointsList, error) {
// panic("mock out the List method")
// },
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.EndpointsList, error) {
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.EndpointsList, error) {
// panic("mock out the ListNamespaced method")
// },
// ObjectClientFunc: func() *objectclient.ObjectClient {
@ -860,10 +768,10 @@ type EndpointsInterfaceMock struct {
GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Endpoints, error)
// ListFunc mocks the List method.
ListFunc func(opts v1b.ListOptions) (*v1a.EndpointsList, error)
ListFunc func(opts v1b.ListOptions) (*v1.EndpointsList, error)
// ListNamespacedFunc mocks the ListNamespaced method.
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.EndpointsList, error)
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.EndpointsList, error)
// ObjectClientFunc mocks the ObjectClient method.
ObjectClientFunc func() *objectclient.ObjectClient
@ -1624,7 +1532,7 @@ func (mock *EndpointsInterfaceMock) GetNamespacedCalls() []struct {
}
// List calls ListFunc.
func (mock *EndpointsInterfaceMock) List(opts v1b.ListOptions) (*v1a.EndpointsList, error) {
func (mock *EndpointsInterfaceMock) List(opts v1b.ListOptions) (*v1.EndpointsList, error) {
if mock.ListFunc == nil {
panic("EndpointsInterfaceMock.ListFunc: method is nil but EndpointsInterface.List was just called")
}
@ -1655,7 +1563,7 @@ func (mock *EndpointsInterfaceMock) ListCalls() []struct {
}
// ListNamespaced calls ListNamespacedFunc.
func (mock *EndpointsInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.EndpointsList, error) {
func (mock *EndpointsInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.EndpointsList, error) {
if mock.ListNamespacedFunc == nil {
panic("EndpointsInterfaceMock.ListNamespacedFunc: method is nil but EndpointsInterface.ListNamespaced was just called")
}

View File

@ -151,8 +151,6 @@ var (
lockEventControllerMockGeneric sync.RWMutex
lockEventControllerMockInformer sync.RWMutex
lockEventControllerMockLister sync.RWMutex
lockEventControllerMockStart sync.RWMutex
lockEventControllerMockSync sync.RWMutex
)
// Ensure, that EventControllerMock does implement EventController.
@ -192,12 +190,6 @@ var _ v1a.EventController = &EventControllerMock{}
// ListerFunc: func() v1a.EventLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedEventController in code that requires EventController
@ -232,12 +224,6 @@ type EventControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v1a.EventLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -309,18 +295,6 @@ type EventControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -648,72 +622,6 @@ func (mock *EventControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *EventControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("EventControllerMock.StartFunc: method is nil but EventController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockEventControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockEventControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedEventController.StartCalls())
func (mock *EventControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockEventControllerMockStart.RLock()
calls = mock.calls.Start
lockEventControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *EventControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("EventControllerMock.SyncFunc: method is nil but EventController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockEventControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockEventControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedEventController.SyncCalls())
func (mock *EventControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockEventControllerMockSync.RLock()
calls = mock.calls.Sync
lockEventControllerMockSync.RUnlock()
return calls
}
var (
lockEventInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockEventInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
@ -792,10 +700,10 @@ var _ v1a.EventInterface = &EventInterfaceMock{}
// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Event, error) {
// panic("mock out the GetNamespaced method")
// },
// ListFunc: func(opts v1b.ListOptions) (*v1a.EventList, error) {
// ListFunc: func(opts v1b.ListOptions) (*v1.EventList, error) {
// panic("mock out the List method")
// },
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.EventList, error) {
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.EventList, error) {
// panic("mock out the ListNamespaced method")
// },
// ObjectClientFunc: func() *objectclient.ObjectClient {
@ -860,10 +768,10 @@ type EventInterfaceMock struct {
GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Event, error)
// ListFunc mocks the List method.
ListFunc func(opts v1b.ListOptions) (*v1a.EventList, error)
ListFunc func(opts v1b.ListOptions) (*v1.EventList, error)
// ListNamespacedFunc mocks the ListNamespaced method.
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.EventList, error)
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.EventList, error)
// ObjectClientFunc mocks the ObjectClient method.
ObjectClientFunc func() *objectclient.ObjectClient
@ -1624,7 +1532,7 @@ func (mock *EventInterfaceMock) GetNamespacedCalls() []struct {
}
// List calls ListFunc.
func (mock *EventInterfaceMock) List(opts v1b.ListOptions) (*v1a.EventList, error) {
func (mock *EventInterfaceMock) List(opts v1b.ListOptions) (*v1.EventList, error) {
if mock.ListFunc == nil {
panic("EventInterfaceMock.ListFunc: method is nil but EventInterface.List was just called")
}
@ -1655,7 +1563,7 @@ func (mock *EventInterfaceMock) ListCalls() []struct {
}
// ListNamespaced calls ListNamespacedFunc.
func (mock *EventInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.EventList, error) {
func (mock *EventInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.EventList, error) {
if mock.ListNamespacedFunc == nil {
panic("EventInterfaceMock.ListNamespacedFunc: method is nil but EventInterface.ListNamespaced was just called")
}

View File

@ -151,8 +151,6 @@ var (
lockLimitRangeControllerMockGeneric sync.RWMutex
lockLimitRangeControllerMockInformer sync.RWMutex
lockLimitRangeControllerMockLister sync.RWMutex
lockLimitRangeControllerMockStart sync.RWMutex
lockLimitRangeControllerMockSync sync.RWMutex
)
// Ensure, that LimitRangeControllerMock does implement LimitRangeController.
@ -192,12 +190,6 @@ var _ v1a.LimitRangeController = &LimitRangeControllerMock{}
// ListerFunc: func() v1a.LimitRangeLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedLimitRangeController in code that requires LimitRangeController
@ -232,12 +224,6 @@ type LimitRangeControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v1a.LimitRangeLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -309,18 +295,6 @@ type LimitRangeControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -648,72 +622,6 @@ func (mock *LimitRangeControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *LimitRangeControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("LimitRangeControllerMock.StartFunc: method is nil but LimitRangeController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockLimitRangeControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockLimitRangeControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedLimitRangeController.StartCalls())
func (mock *LimitRangeControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockLimitRangeControllerMockStart.RLock()
calls = mock.calls.Start
lockLimitRangeControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *LimitRangeControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("LimitRangeControllerMock.SyncFunc: method is nil but LimitRangeController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockLimitRangeControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockLimitRangeControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedLimitRangeController.SyncCalls())
func (mock *LimitRangeControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockLimitRangeControllerMockSync.RLock()
calls = mock.calls.Sync
lockLimitRangeControllerMockSync.RUnlock()
return calls
}
var (
lockLimitRangeInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockLimitRangeInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
@ -792,10 +700,10 @@ var _ v1a.LimitRangeInterface = &LimitRangeInterfaceMock{}
// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.LimitRange, error) {
// panic("mock out the GetNamespaced method")
// },
// ListFunc: func(opts v1b.ListOptions) (*v1a.LimitRangeList, error) {
// ListFunc: func(opts v1b.ListOptions) (*v1.LimitRangeList, error) {
// panic("mock out the List method")
// },
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.LimitRangeList, error) {
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.LimitRangeList, error) {
// panic("mock out the ListNamespaced method")
// },
// ObjectClientFunc: func() *objectclient.ObjectClient {
@ -860,10 +768,10 @@ type LimitRangeInterfaceMock struct {
GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.LimitRange, error)
// ListFunc mocks the List method.
ListFunc func(opts v1b.ListOptions) (*v1a.LimitRangeList, error)
ListFunc func(opts v1b.ListOptions) (*v1.LimitRangeList, error)
// ListNamespacedFunc mocks the ListNamespaced method.
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.LimitRangeList, error)
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.LimitRangeList, error)
// ObjectClientFunc mocks the ObjectClient method.
ObjectClientFunc func() *objectclient.ObjectClient
@ -1624,7 +1532,7 @@ func (mock *LimitRangeInterfaceMock) GetNamespacedCalls() []struct {
}
// List calls ListFunc.
func (mock *LimitRangeInterfaceMock) List(opts v1b.ListOptions) (*v1a.LimitRangeList, error) {
func (mock *LimitRangeInterfaceMock) List(opts v1b.ListOptions) (*v1.LimitRangeList, error) {
if mock.ListFunc == nil {
panic("LimitRangeInterfaceMock.ListFunc: method is nil but LimitRangeInterface.List was just called")
}
@ -1655,7 +1563,7 @@ func (mock *LimitRangeInterfaceMock) ListCalls() []struct {
}
// ListNamespaced calls ListNamespacedFunc.
func (mock *LimitRangeInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.LimitRangeList, error) {
func (mock *LimitRangeInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.LimitRangeList, error) {
if mock.ListNamespacedFunc == nil {
panic("LimitRangeInterfaceMock.ListNamespacedFunc: method is nil but LimitRangeInterface.ListNamespaced was just called")
}

View File

@ -151,8 +151,6 @@ var (
lockNamespaceControllerMockGeneric sync.RWMutex
lockNamespaceControllerMockInformer sync.RWMutex
lockNamespaceControllerMockLister sync.RWMutex
lockNamespaceControllerMockStart sync.RWMutex
lockNamespaceControllerMockSync sync.RWMutex
)
// Ensure, that NamespaceControllerMock does implement NamespaceController.
@ -192,12 +190,6 @@ var _ v1a.NamespaceController = &NamespaceControllerMock{}
// ListerFunc: func() v1a.NamespaceLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedNamespaceController in code that requires NamespaceController
@ -232,12 +224,6 @@ type NamespaceControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v1a.NamespaceLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -309,18 +295,6 @@ type NamespaceControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -648,72 +622,6 @@ func (mock *NamespaceControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *NamespaceControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("NamespaceControllerMock.StartFunc: method is nil but NamespaceController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockNamespaceControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockNamespaceControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedNamespaceController.StartCalls())
func (mock *NamespaceControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockNamespaceControllerMockStart.RLock()
calls = mock.calls.Start
lockNamespaceControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *NamespaceControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("NamespaceControllerMock.SyncFunc: method is nil but NamespaceController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockNamespaceControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockNamespaceControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedNamespaceController.SyncCalls())
func (mock *NamespaceControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockNamespaceControllerMockSync.RLock()
calls = mock.calls.Sync
lockNamespaceControllerMockSync.RUnlock()
return calls
}
var (
lockNamespaceInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockNamespaceInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
@ -792,10 +700,10 @@ var _ v1a.NamespaceInterface = &NamespaceInterfaceMock{}
// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Namespace, error) {
// panic("mock out the GetNamespaced method")
// },
// ListFunc: func(opts v1b.ListOptions) (*v1a.NamespaceList, error) {
// ListFunc: func(opts v1b.ListOptions) (*v1.NamespaceList, error) {
// panic("mock out the List method")
// },
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.NamespaceList, error) {
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.NamespaceList, error) {
// panic("mock out the ListNamespaced method")
// },
// ObjectClientFunc: func() *objectclient.ObjectClient {
@ -860,10 +768,10 @@ type NamespaceInterfaceMock struct {
GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Namespace, error)
// ListFunc mocks the List method.
ListFunc func(opts v1b.ListOptions) (*v1a.NamespaceList, error)
ListFunc func(opts v1b.ListOptions) (*v1.NamespaceList, error)
// ListNamespacedFunc mocks the ListNamespaced method.
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.NamespaceList, error)
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.NamespaceList, error)
// ObjectClientFunc mocks the ObjectClient method.
ObjectClientFunc func() *objectclient.ObjectClient
@ -1624,7 +1532,7 @@ func (mock *NamespaceInterfaceMock) GetNamespacedCalls() []struct {
}
// List calls ListFunc.
func (mock *NamespaceInterfaceMock) List(opts v1b.ListOptions) (*v1a.NamespaceList, error) {
func (mock *NamespaceInterfaceMock) List(opts v1b.ListOptions) (*v1.NamespaceList, error) {
if mock.ListFunc == nil {
panic("NamespaceInterfaceMock.ListFunc: method is nil but NamespaceInterface.List was just called")
}
@ -1655,7 +1563,7 @@ func (mock *NamespaceInterfaceMock) ListCalls() []struct {
}
// ListNamespaced calls ListNamespacedFunc.
func (mock *NamespaceInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.NamespaceList, error) {
func (mock *NamespaceInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.NamespaceList, error) {
if mock.ListNamespacedFunc == nil {
panic("NamespaceInterfaceMock.ListNamespacedFunc: method is nil but NamespaceInterface.ListNamespaced was just called")
}

View File

@ -151,8 +151,6 @@ var (
lockNodeControllerMockGeneric sync.RWMutex
lockNodeControllerMockInformer sync.RWMutex
lockNodeControllerMockLister sync.RWMutex
lockNodeControllerMockStart sync.RWMutex
lockNodeControllerMockSync sync.RWMutex
)
// Ensure, that NodeControllerMock does implement NodeController.
@ -192,12 +190,6 @@ var _ v1a.NodeController = &NodeControllerMock{}
// ListerFunc: func() v1a.NodeLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedNodeController in code that requires NodeController
@ -232,12 +224,6 @@ type NodeControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v1a.NodeLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -309,18 +295,6 @@ type NodeControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -648,72 +622,6 @@ func (mock *NodeControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *NodeControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("NodeControllerMock.StartFunc: method is nil but NodeController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockNodeControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockNodeControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedNodeController.StartCalls())
func (mock *NodeControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockNodeControllerMockStart.RLock()
calls = mock.calls.Start
lockNodeControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *NodeControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("NodeControllerMock.SyncFunc: method is nil but NodeController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockNodeControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockNodeControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedNodeController.SyncCalls())
func (mock *NodeControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockNodeControllerMockSync.RLock()
calls = mock.calls.Sync
lockNodeControllerMockSync.RUnlock()
return calls
}
var (
lockNodeInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockNodeInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
@ -792,10 +700,10 @@ var _ v1a.NodeInterface = &NodeInterfaceMock{}
// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Node, error) {
// panic("mock out the GetNamespaced method")
// },
// ListFunc: func(opts v1b.ListOptions) (*v1a.NodeList, error) {
// ListFunc: func(opts v1b.ListOptions) (*v1.NodeList, error) {
// panic("mock out the List method")
// },
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.NodeList, error) {
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.NodeList, error) {
// panic("mock out the ListNamespaced method")
// },
// ObjectClientFunc: func() *objectclient.ObjectClient {
@ -860,10 +768,10 @@ type NodeInterfaceMock struct {
GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Node, error)
// ListFunc mocks the List method.
ListFunc func(opts v1b.ListOptions) (*v1a.NodeList, error)
ListFunc func(opts v1b.ListOptions) (*v1.NodeList, error)
// ListNamespacedFunc mocks the ListNamespaced method.
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.NodeList, error)
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.NodeList, error)
// ObjectClientFunc mocks the ObjectClient method.
ObjectClientFunc func() *objectclient.ObjectClient
@ -1624,7 +1532,7 @@ func (mock *NodeInterfaceMock) GetNamespacedCalls() []struct {
}
// List calls ListFunc.
func (mock *NodeInterfaceMock) List(opts v1b.ListOptions) (*v1a.NodeList, error) {
func (mock *NodeInterfaceMock) List(opts v1b.ListOptions) (*v1.NodeList, error) {
if mock.ListFunc == nil {
panic("NodeInterfaceMock.ListFunc: method is nil but NodeInterface.List was just called")
}
@ -1655,7 +1563,7 @@ func (mock *NodeInterfaceMock) ListCalls() []struct {
}
// ListNamespaced calls ListNamespacedFunc.
func (mock *NodeInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.NodeList, error) {
func (mock *NodeInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.NodeList, error) {
if mock.ListNamespacedFunc == nil {
panic("NodeInterfaceMock.ListNamespacedFunc: method is nil but NodeInterface.ListNamespaced was just called")
}

View File

@ -151,8 +151,6 @@ var (
lockPersistentVolumeClaimControllerMockGeneric sync.RWMutex
lockPersistentVolumeClaimControllerMockInformer sync.RWMutex
lockPersistentVolumeClaimControllerMockLister sync.RWMutex
lockPersistentVolumeClaimControllerMockStart sync.RWMutex
lockPersistentVolumeClaimControllerMockSync sync.RWMutex
)
// Ensure, that PersistentVolumeClaimControllerMock does implement PersistentVolumeClaimController.
@ -192,12 +190,6 @@ var _ v1a.PersistentVolumeClaimController = &PersistentVolumeClaimControllerMock
// ListerFunc: func() v1a.PersistentVolumeClaimLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedPersistentVolumeClaimController in code that requires PersistentVolumeClaimController
@ -232,12 +224,6 @@ type PersistentVolumeClaimControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v1a.PersistentVolumeClaimLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -309,18 +295,6 @@ type PersistentVolumeClaimControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -648,72 +622,6 @@ func (mock *PersistentVolumeClaimControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *PersistentVolumeClaimControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("PersistentVolumeClaimControllerMock.StartFunc: method is nil but PersistentVolumeClaimController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockPersistentVolumeClaimControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockPersistentVolumeClaimControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedPersistentVolumeClaimController.StartCalls())
func (mock *PersistentVolumeClaimControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockPersistentVolumeClaimControllerMockStart.RLock()
calls = mock.calls.Start
lockPersistentVolumeClaimControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *PersistentVolumeClaimControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("PersistentVolumeClaimControllerMock.SyncFunc: method is nil but PersistentVolumeClaimController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockPersistentVolumeClaimControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockPersistentVolumeClaimControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedPersistentVolumeClaimController.SyncCalls())
func (mock *PersistentVolumeClaimControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockPersistentVolumeClaimControllerMockSync.RLock()
calls = mock.calls.Sync
lockPersistentVolumeClaimControllerMockSync.RUnlock()
return calls
}
var (
lockPersistentVolumeClaimInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockPersistentVolumeClaimInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
@ -792,10 +700,10 @@ var _ v1a.PersistentVolumeClaimInterface = &PersistentVolumeClaimInterfaceMock{}
// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.PersistentVolumeClaim, error) {
// panic("mock out the GetNamespaced method")
// },
// ListFunc: func(opts v1b.ListOptions) (*v1a.PersistentVolumeClaimList, error) {
// ListFunc: func(opts v1b.ListOptions) (*v1.PersistentVolumeClaimList, error) {
// panic("mock out the List method")
// },
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.PersistentVolumeClaimList, error) {
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.PersistentVolumeClaimList, error) {
// panic("mock out the ListNamespaced method")
// },
// ObjectClientFunc: func() *objectclient.ObjectClient {
@ -860,10 +768,10 @@ type PersistentVolumeClaimInterfaceMock struct {
GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.PersistentVolumeClaim, error)
// ListFunc mocks the List method.
ListFunc func(opts v1b.ListOptions) (*v1a.PersistentVolumeClaimList, error)
ListFunc func(opts v1b.ListOptions) (*v1.PersistentVolumeClaimList, error)
// ListNamespacedFunc mocks the ListNamespaced method.
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.PersistentVolumeClaimList, error)
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.PersistentVolumeClaimList, error)
// ObjectClientFunc mocks the ObjectClient method.
ObjectClientFunc func() *objectclient.ObjectClient
@ -1624,7 +1532,7 @@ func (mock *PersistentVolumeClaimInterfaceMock) GetNamespacedCalls() []struct {
}
// List calls ListFunc.
func (mock *PersistentVolumeClaimInterfaceMock) List(opts v1b.ListOptions) (*v1a.PersistentVolumeClaimList, error) {
func (mock *PersistentVolumeClaimInterfaceMock) List(opts v1b.ListOptions) (*v1.PersistentVolumeClaimList, error) {
if mock.ListFunc == nil {
panic("PersistentVolumeClaimInterfaceMock.ListFunc: method is nil but PersistentVolumeClaimInterface.List was just called")
}
@ -1655,7 +1563,7 @@ func (mock *PersistentVolumeClaimInterfaceMock) ListCalls() []struct {
}
// ListNamespaced calls ListNamespacedFunc.
func (mock *PersistentVolumeClaimInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.PersistentVolumeClaimList, error) {
func (mock *PersistentVolumeClaimInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.PersistentVolumeClaimList, error) {
if mock.ListNamespacedFunc == nil {
panic("PersistentVolumeClaimInterfaceMock.ListNamespacedFunc: method is nil but PersistentVolumeClaimInterface.ListNamespaced was just called")
}

View File

@ -151,8 +151,6 @@ var (
lockPodControllerMockGeneric sync.RWMutex
lockPodControllerMockInformer sync.RWMutex
lockPodControllerMockLister sync.RWMutex
lockPodControllerMockStart sync.RWMutex
lockPodControllerMockSync sync.RWMutex
)
// Ensure, that PodControllerMock does implement PodController.
@ -192,12 +190,6 @@ var _ v1a.PodController = &PodControllerMock{}
// ListerFunc: func() v1a.PodLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedPodController in code that requires PodController
@ -232,12 +224,6 @@ type PodControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v1a.PodLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -309,18 +295,6 @@ type PodControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -648,72 +622,6 @@ func (mock *PodControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *PodControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("PodControllerMock.StartFunc: method is nil but PodController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockPodControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockPodControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedPodController.StartCalls())
func (mock *PodControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockPodControllerMockStart.RLock()
calls = mock.calls.Start
lockPodControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *PodControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("PodControllerMock.SyncFunc: method is nil but PodController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockPodControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockPodControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedPodController.SyncCalls())
func (mock *PodControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockPodControllerMockSync.RLock()
calls = mock.calls.Sync
lockPodControllerMockSync.RUnlock()
return calls
}
var (
lockPodInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockPodInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
@ -792,10 +700,10 @@ var _ v1a.PodInterface = &PodInterfaceMock{}
// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Pod, error) {
// panic("mock out the GetNamespaced method")
// },
// ListFunc: func(opts v1b.ListOptions) (*v1a.PodList, error) {
// ListFunc: func(opts v1b.ListOptions) (*v1.PodList, error) {
// panic("mock out the List method")
// },
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.PodList, error) {
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.PodList, error) {
// panic("mock out the ListNamespaced method")
// },
// ObjectClientFunc: func() *objectclient.ObjectClient {
@ -860,10 +768,10 @@ type PodInterfaceMock struct {
GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Pod, error)
// ListFunc mocks the List method.
ListFunc func(opts v1b.ListOptions) (*v1a.PodList, error)
ListFunc func(opts v1b.ListOptions) (*v1.PodList, error)
// ListNamespacedFunc mocks the ListNamespaced method.
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.PodList, error)
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.PodList, error)
// ObjectClientFunc mocks the ObjectClient method.
ObjectClientFunc func() *objectclient.ObjectClient
@ -1624,7 +1532,7 @@ func (mock *PodInterfaceMock) GetNamespacedCalls() []struct {
}
// List calls ListFunc.
func (mock *PodInterfaceMock) List(opts v1b.ListOptions) (*v1a.PodList, error) {
func (mock *PodInterfaceMock) List(opts v1b.ListOptions) (*v1.PodList, error) {
if mock.ListFunc == nil {
panic("PodInterfaceMock.ListFunc: method is nil but PodInterface.List was just called")
}
@ -1655,7 +1563,7 @@ func (mock *PodInterfaceMock) ListCalls() []struct {
}
// ListNamespaced calls ListNamespacedFunc.
func (mock *PodInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.PodList, error) {
func (mock *PodInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.PodList, error) {
if mock.ListNamespacedFunc == nil {
panic("PodInterfaceMock.ListNamespacedFunc: method is nil but PodInterface.ListNamespaced was just called")
}

View File

@ -151,8 +151,6 @@ var (
lockReplicationControllerControllerMockGeneric sync.RWMutex
lockReplicationControllerControllerMockInformer sync.RWMutex
lockReplicationControllerControllerMockLister sync.RWMutex
lockReplicationControllerControllerMockStart sync.RWMutex
lockReplicationControllerControllerMockSync sync.RWMutex
)
// Ensure, that ReplicationControllerControllerMock does implement ReplicationControllerController.
@ -192,12 +190,6 @@ var _ v1a.ReplicationControllerController = &ReplicationControllerControllerMock
// ListerFunc: func() v1a.ReplicationControllerLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedReplicationControllerController in code that requires ReplicationControllerController
@ -232,12 +224,6 @@ type ReplicationControllerControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v1a.ReplicationControllerLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -309,18 +295,6 @@ type ReplicationControllerControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -648,72 +622,6 @@ func (mock *ReplicationControllerControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *ReplicationControllerControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("ReplicationControllerControllerMock.StartFunc: method is nil but ReplicationControllerController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockReplicationControllerControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockReplicationControllerControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedReplicationControllerController.StartCalls())
func (mock *ReplicationControllerControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockReplicationControllerControllerMockStart.RLock()
calls = mock.calls.Start
lockReplicationControllerControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *ReplicationControllerControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("ReplicationControllerControllerMock.SyncFunc: method is nil but ReplicationControllerController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockReplicationControllerControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockReplicationControllerControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedReplicationControllerController.SyncCalls())
func (mock *ReplicationControllerControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockReplicationControllerControllerMockSync.RLock()
calls = mock.calls.Sync
lockReplicationControllerControllerMockSync.RUnlock()
return calls
}
var (
lockReplicationControllerInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockReplicationControllerInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
@ -792,10 +700,10 @@ var _ v1a.ReplicationControllerInterface = &ReplicationControllerInterfaceMock{}
// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.ReplicationController, error) {
// panic("mock out the GetNamespaced method")
// },
// ListFunc: func(opts v1b.ListOptions) (*v1a.ReplicationControllerList, error) {
// ListFunc: func(opts v1b.ListOptions) (*v1.ReplicationControllerList, error) {
// panic("mock out the List method")
// },
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.ReplicationControllerList, error) {
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.ReplicationControllerList, error) {
// panic("mock out the ListNamespaced method")
// },
// ObjectClientFunc: func() *objectclient.ObjectClient {
@ -860,10 +768,10 @@ type ReplicationControllerInterfaceMock struct {
GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.ReplicationController, error)
// ListFunc mocks the List method.
ListFunc func(opts v1b.ListOptions) (*v1a.ReplicationControllerList, error)
ListFunc func(opts v1b.ListOptions) (*v1.ReplicationControllerList, error)
// ListNamespacedFunc mocks the ListNamespaced method.
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.ReplicationControllerList, error)
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.ReplicationControllerList, error)
// ObjectClientFunc mocks the ObjectClient method.
ObjectClientFunc func() *objectclient.ObjectClient
@ -1624,7 +1532,7 @@ func (mock *ReplicationControllerInterfaceMock) GetNamespacedCalls() []struct {
}
// List calls ListFunc.
func (mock *ReplicationControllerInterfaceMock) List(opts v1b.ListOptions) (*v1a.ReplicationControllerList, error) {
func (mock *ReplicationControllerInterfaceMock) List(opts v1b.ListOptions) (*v1.ReplicationControllerList, error) {
if mock.ListFunc == nil {
panic("ReplicationControllerInterfaceMock.ListFunc: method is nil but ReplicationControllerInterface.List was just called")
}
@ -1655,7 +1563,7 @@ func (mock *ReplicationControllerInterfaceMock) ListCalls() []struct {
}
// ListNamespaced calls ListNamespacedFunc.
func (mock *ReplicationControllerInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.ReplicationControllerList, error) {
func (mock *ReplicationControllerInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.ReplicationControllerList, error) {
if mock.ListNamespacedFunc == nil {
panic("ReplicationControllerInterfaceMock.ListNamespacedFunc: method is nil but ReplicationControllerInterface.ListNamespaced was just called")
}

View File

@ -151,8 +151,6 @@ var (
lockResourceQuotaControllerMockGeneric sync.RWMutex
lockResourceQuotaControllerMockInformer sync.RWMutex
lockResourceQuotaControllerMockLister sync.RWMutex
lockResourceQuotaControllerMockStart sync.RWMutex
lockResourceQuotaControllerMockSync sync.RWMutex
)
// Ensure, that ResourceQuotaControllerMock does implement ResourceQuotaController.
@ -192,12 +190,6 @@ var _ v1a.ResourceQuotaController = &ResourceQuotaControllerMock{}
// ListerFunc: func() v1a.ResourceQuotaLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedResourceQuotaController in code that requires ResourceQuotaController
@ -232,12 +224,6 @@ type ResourceQuotaControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v1a.ResourceQuotaLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -309,18 +295,6 @@ type ResourceQuotaControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -648,72 +622,6 @@ func (mock *ResourceQuotaControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *ResourceQuotaControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("ResourceQuotaControllerMock.StartFunc: method is nil but ResourceQuotaController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockResourceQuotaControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockResourceQuotaControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedResourceQuotaController.StartCalls())
func (mock *ResourceQuotaControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockResourceQuotaControllerMockStart.RLock()
calls = mock.calls.Start
lockResourceQuotaControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *ResourceQuotaControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("ResourceQuotaControllerMock.SyncFunc: method is nil but ResourceQuotaController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockResourceQuotaControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockResourceQuotaControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedResourceQuotaController.SyncCalls())
func (mock *ResourceQuotaControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockResourceQuotaControllerMockSync.RLock()
calls = mock.calls.Sync
lockResourceQuotaControllerMockSync.RUnlock()
return calls
}
var (
lockResourceQuotaInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockResourceQuotaInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
@ -792,10 +700,10 @@ var _ v1a.ResourceQuotaInterface = &ResourceQuotaInterfaceMock{}
// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.ResourceQuota, error) {
// panic("mock out the GetNamespaced method")
// },
// ListFunc: func(opts v1b.ListOptions) (*v1a.ResourceQuotaList, error) {
// ListFunc: func(opts v1b.ListOptions) (*v1.ResourceQuotaList, error) {
// panic("mock out the List method")
// },
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.ResourceQuotaList, error) {
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.ResourceQuotaList, error) {
// panic("mock out the ListNamespaced method")
// },
// ObjectClientFunc: func() *objectclient.ObjectClient {
@ -860,10 +768,10 @@ type ResourceQuotaInterfaceMock struct {
GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.ResourceQuota, error)
// ListFunc mocks the List method.
ListFunc func(opts v1b.ListOptions) (*v1a.ResourceQuotaList, error)
ListFunc func(opts v1b.ListOptions) (*v1.ResourceQuotaList, error)
// ListNamespacedFunc mocks the ListNamespaced method.
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.ResourceQuotaList, error)
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.ResourceQuotaList, error)
// ObjectClientFunc mocks the ObjectClient method.
ObjectClientFunc func() *objectclient.ObjectClient
@ -1624,7 +1532,7 @@ func (mock *ResourceQuotaInterfaceMock) GetNamespacedCalls() []struct {
}
// List calls ListFunc.
func (mock *ResourceQuotaInterfaceMock) List(opts v1b.ListOptions) (*v1a.ResourceQuotaList, error) {
func (mock *ResourceQuotaInterfaceMock) List(opts v1b.ListOptions) (*v1.ResourceQuotaList, error) {
if mock.ListFunc == nil {
panic("ResourceQuotaInterfaceMock.ListFunc: method is nil but ResourceQuotaInterface.List was just called")
}
@ -1655,7 +1563,7 @@ func (mock *ResourceQuotaInterfaceMock) ListCalls() []struct {
}
// ListNamespaced calls ListNamespacedFunc.
func (mock *ResourceQuotaInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.ResourceQuotaList, error) {
func (mock *ResourceQuotaInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.ResourceQuotaList, error) {
if mock.ListNamespacedFunc == nil {
panic("ResourceQuotaInterfaceMock.ListNamespacedFunc: method is nil but ResourceQuotaInterface.ListNamespaced was just called")
}

View File

@ -151,8 +151,6 @@ var (
lockSecretControllerMockGeneric sync.RWMutex
lockSecretControllerMockInformer sync.RWMutex
lockSecretControllerMockLister sync.RWMutex
lockSecretControllerMockStart sync.RWMutex
lockSecretControllerMockSync sync.RWMutex
)
// Ensure, that SecretControllerMock does implement SecretController.
@ -192,12 +190,6 @@ var _ v1a.SecretController = &SecretControllerMock{}
// ListerFunc: func() v1a.SecretLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedSecretController in code that requires SecretController
@ -232,12 +224,6 @@ type SecretControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v1a.SecretLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -309,18 +295,6 @@ type SecretControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -648,72 +622,6 @@ func (mock *SecretControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *SecretControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("SecretControllerMock.StartFunc: method is nil but SecretController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockSecretControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockSecretControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedSecretController.StartCalls())
func (mock *SecretControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockSecretControllerMockStart.RLock()
calls = mock.calls.Start
lockSecretControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *SecretControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("SecretControllerMock.SyncFunc: method is nil but SecretController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockSecretControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockSecretControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedSecretController.SyncCalls())
func (mock *SecretControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockSecretControllerMockSync.RLock()
calls = mock.calls.Sync
lockSecretControllerMockSync.RUnlock()
return calls
}
var (
lockSecretInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockSecretInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
@ -792,10 +700,10 @@ var _ v1a.SecretInterface = &SecretInterfaceMock{}
// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Secret, error) {
// panic("mock out the GetNamespaced method")
// },
// ListFunc: func(opts v1b.ListOptions) (*v1a.SecretList, error) {
// ListFunc: func(opts v1b.ListOptions) (*v1.SecretList, error) {
// panic("mock out the List method")
// },
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.SecretList, error) {
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.SecretList, error) {
// panic("mock out the ListNamespaced method")
// },
// ObjectClientFunc: func() *objectclient.ObjectClient {
@ -860,10 +768,10 @@ type SecretInterfaceMock struct {
GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Secret, error)
// ListFunc mocks the List method.
ListFunc func(opts v1b.ListOptions) (*v1a.SecretList, error)
ListFunc func(opts v1b.ListOptions) (*v1.SecretList, error)
// ListNamespacedFunc mocks the ListNamespaced method.
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.SecretList, error)
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.SecretList, error)
// ObjectClientFunc mocks the ObjectClient method.
ObjectClientFunc func() *objectclient.ObjectClient
@ -1624,7 +1532,7 @@ func (mock *SecretInterfaceMock) GetNamespacedCalls() []struct {
}
// List calls ListFunc.
func (mock *SecretInterfaceMock) List(opts v1b.ListOptions) (*v1a.SecretList, error) {
func (mock *SecretInterfaceMock) List(opts v1b.ListOptions) (*v1.SecretList, error) {
if mock.ListFunc == nil {
panic("SecretInterfaceMock.ListFunc: method is nil but SecretInterface.List was just called")
}
@ -1655,7 +1563,7 @@ func (mock *SecretInterfaceMock) ListCalls() []struct {
}
// ListNamespaced calls ListNamespacedFunc.
func (mock *SecretInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.SecretList, error) {
func (mock *SecretInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.SecretList, error) {
if mock.ListNamespacedFunc == nil {
panic("SecretInterfaceMock.ListNamespacedFunc: method is nil but SecretInterface.ListNamespaced was just called")
}

View File

@ -151,8 +151,6 @@ var (
lockServiceAccountControllerMockGeneric sync.RWMutex
lockServiceAccountControllerMockInformer sync.RWMutex
lockServiceAccountControllerMockLister sync.RWMutex
lockServiceAccountControllerMockStart sync.RWMutex
lockServiceAccountControllerMockSync sync.RWMutex
)
// Ensure, that ServiceAccountControllerMock does implement ServiceAccountController.
@ -192,12 +190,6 @@ var _ v1a.ServiceAccountController = &ServiceAccountControllerMock{}
// ListerFunc: func() v1a.ServiceAccountLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedServiceAccountController in code that requires ServiceAccountController
@ -232,12 +224,6 @@ type ServiceAccountControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v1a.ServiceAccountLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -309,18 +295,6 @@ type ServiceAccountControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -648,72 +622,6 @@ func (mock *ServiceAccountControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *ServiceAccountControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("ServiceAccountControllerMock.StartFunc: method is nil but ServiceAccountController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockServiceAccountControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockServiceAccountControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedServiceAccountController.StartCalls())
func (mock *ServiceAccountControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockServiceAccountControllerMockStart.RLock()
calls = mock.calls.Start
lockServiceAccountControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *ServiceAccountControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("ServiceAccountControllerMock.SyncFunc: method is nil but ServiceAccountController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockServiceAccountControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockServiceAccountControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedServiceAccountController.SyncCalls())
func (mock *ServiceAccountControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockServiceAccountControllerMockSync.RLock()
calls = mock.calls.Sync
lockServiceAccountControllerMockSync.RUnlock()
return calls
}
var (
lockServiceAccountInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockServiceAccountInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
@ -792,10 +700,10 @@ var _ v1a.ServiceAccountInterface = &ServiceAccountInterfaceMock{}
// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.ServiceAccount, error) {
// panic("mock out the GetNamespaced method")
// },
// ListFunc: func(opts v1b.ListOptions) (*v1a.ServiceAccountList, error) {
// ListFunc: func(opts v1b.ListOptions) (*v1.ServiceAccountList, error) {
// panic("mock out the List method")
// },
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.ServiceAccountList, error) {
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.ServiceAccountList, error) {
// panic("mock out the ListNamespaced method")
// },
// ObjectClientFunc: func() *objectclient.ObjectClient {
@ -860,10 +768,10 @@ type ServiceAccountInterfaceMock struct {
GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.ServiceAccount, error)
// ListFunc mocks the List method.
ListFunc func(opts v1b.ListOptions) (*v1a.ServiceAccountList, error)
ListFunc func(opts v1b.ListOptions) (*v1.ServiceAccountList, error)
// ListNamespacedFunc mocks the ListNamespaced method.
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.ServiceAccountList, error)
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.ServiceAccountList, error)
// ObjectClientFunc mocks the ObjectClient method.
ObjectClientFunc func() *objectclient.ObjectClient
@ -1624,7 +1532,7 @@ func (mock *ServiceAccountInterfaceMock) GetNamespacedCalls() []struct {
}
// List calls ListFunc.
func (mock *ServiceAccountInterfaceMock) List(opts v1b.ListOptions) (*v1a.ServiceAccountList, error) {
func (mock *ServiceAccountInterfaceMock) List(opts v1b.ListOptions) (*v1.ServiceAccountList, error) {
if mock.ListFunc == nil {
panic("ServiceAccountInterfaceMock.ListFunc: method is nil but ServiceAccountInterface.List was just called")
}
@ -1655,7 +1563,7 @@ func (mock *ServiceAccountInterfaceMock) ListCalls() []struct {
}
// ListNamespaced calls ListNamespacedFunc.
func (mock *ServiceAccountInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.ServiceAccountList, error) {
func (mock *ServiceAccountInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.ServiceAccountList, error) {
if mock.ListNamespacedFunc == nil {
panic("ServiceAccountInterfaceMock.ListNamespacedFunc: method is nil but ServiceAccountInterface.ListNamespaced was just called")
}

View File

@ -151,8 +151,6 @@ var (
lockServiceControllerMockGeneric sync.RWMutex
lockServiceControllerMockInformer sync.RWMutex
lockServiceControllerMockLister sync.RWMutex
lockServiceControllerMockStart sync.RWMutex
lockServiceControllerMockSync sync.RWMutex
)
// Ensure, that ServiceControllerMock does implement ServiceController.
@ -192,12 +190,6 @@ var _ v1a.ServiceController = &ServiceControllerMock{}
// ListerFunc: func() v1a.ServiceLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedServiceController in code that requires ServiceController
@ -232,12 +224,6 @@ type ServiceControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v1a.ServiceLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -309,18 +295,6 @@ type ServiceControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -648,72 +622,6 @@ func (mock *ServiceControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *ServiceControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("ServiceControllerMock.StartFunc: method is nil but ServiceController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockServiceControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockServiceControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedServiceController.StartCalls())
func (mock *ServiceControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockServiceControllerMockStart.RLock()
calls = mock.calls.Start
lockServiceControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *ServiceControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("ServiceControllerMock.SyncFunc: method is nil but ServiceController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockServiceControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockServiceControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedServiceController.SyncCalls())
func (mock *ServiceControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockServiceControllerMockSync.RLock()
calls = mock.calls.Sync
lockServiceControllerMockSync.RUnlock()
return calls
}
var (
lockServiceInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockServiceInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
@ -792,10 +700,10 @@ var _ v1a.ServiceInterface = &ServiceInterfaceMock{}
// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Service, error) {
// panic("mock out the GetNamespaced method")
// },
// ListFunc: func(opts v1b.ListOptions) (*v1a.ServiceList, error) {
// ListFunc: func(opts v1b.ListOptions) (*v1.ServiceList, error) {
// panic("mock out the List method")
// },
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.ServiceList, error) {
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.ServiceList, error) {
// panic("mock out the ListNamespaced method")
// },
// ObjectClientFunc: func() *objectclient.ObjectClient {
@ -860,10 +768,10 @@ type ServiceInterfaceMock struct {
GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Service, error)
// ListFunc mocks the List method.
ListFunc func(opts v1b.ListOptions) (*v1a.ServiceList, error)
ListFunc func(opts v1b.ListOptions) (*v1.ServiceList, error)
// ListNamespacedFunc mocks the ListNamespaced method.
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.ServiceList, error)
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.ServiceList, error)
// ObjectClientFunc mocks the ObjectClient method.
ObjectClientFunc func() *objectclient.ObjectClient
@ -1624,7 +1532,7 @@ func (mock *ServiceInterfaceMock) GetNamespacedCalls() []struct {
}
// List calls ListFunc.
func (mock *ServiceInterfaceMock) List(opts v1b.ListOptions) (*v1a.ServiceList, error) {
func (mock *ServiceInterfaceMock) List(opts v1b.ListOptions) (*v1.ServiceList, error) {
if mock.ListFunc == nil {
panic("ServiceInterfaceMock.ListFunc: method is nil but ServiceInterface.List was just called")
}
@ -1655,7 +1563,7 @@ func (mock *ServiceInterfaceMock) ListCalls() []struct {
}
// ListNamespaced calls ListNamespacedFunc.
func (mock *ServiceInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.ServiceList, error) {
func (mock *ServiceInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.ServiceList, error) {
if mock.ListNamespacedFunc == nil {
panic("ServiceInterfaceMock.ListNamespacedFunc: method is nil but ServiceInterface.ListNamespaced was just called")
}

View File

@ -49,12 +49,6 @@ func NewComponentStatus(namespace, name string, obj v1.ComponentStatus) *v1.Comp
return &obj
}
type ComponentStatusList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []v1.ComponentStatus `json:"items"`
}
type ComponentStatusHandlerFunc func(key string, obj *v1.ComponentStatus) (runtime.Object, error)
type ComponentStatusChangeHandlerFunc func(obj *v1.ComponentStatus) (runtime.Object, error)
@ -74,8 +68,6 @@ type ComponentStatusController interface {
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ComponentStatusHandlerFunc)
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, after time.Duration)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type ComponentStatusInterface interface {
@ -86,8 +78,8 @@ type ComponentStatusInterface interface {
Update(*v1.ComponentStatus) (*v1.ComponentStatus, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*ComponentStatusList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*ComponentStatusList, error)
List(opts metav1.ListOptions) (*v1.ComponentStatusList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ComponentStatusList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() ComponentStatusController
@ -126,7 +118,7 @@ func (l *componentStatusLister) Get(namespace, name string) (*v1.ComponentStatus
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: ComponentStatusGroupVersionKind.Group,
Resource: "componentStatus",
Resource: ComponentStatusGroupVersionResource.Resource,
}, key)
}
return obj.(*v1.ComponentStatus), nil
@ -206,29 +198,16 @@ func (c componentStatusFactory) Object() runtime.Object {
}
func (c componentStatusFactory) List() runtime.Object {
return &ComponentStatusList{}
return &v1.ComponentStatusList{}
}
func (s *componentStatusClient) Controller() ComponentStatusController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.componentStatusControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(ComponentStatusGroupVersionKind.Kind+"Controller",
s.objectClient)
s.client.controllerFactory.ForResourceKind(ComponentStatusGroupVersionResource, ComponentStatusGroupVersionKind.Kind, false))
c = &componentStatusController{
return &componentStatusController{
GenericController: genericController,
}
s.client.componentStatusControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type componentStatusClient struct {
@ -262,6 +241,11 @@ func (s *componentStatusClient) Update(o *v1.ComponentStatus) (*v1.ComponentStat
return obj.(*v1.ComponentStatus), err
}
func (s *componentStatusClient) UpdateStatus(o *v1.ComponentStatus) (*v1.ComponentStatus, error) {
obj, err := s.objectClient.UpdateStatus(o.Name, o)
return obj.(*v1.ComponentStatus), err
}
func (s *componentStatusClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
@ -270,14 +254,14 @@ func (s *componentStatusClient) DeleteNamespaced(namespace, name string, options
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *componentStatusClient) List(opts metav1.ListOptions) (*ComponentStatusList, error) {
func (s *componentStatusClient) List(opts metav1.ListOptions) (*v1.ComponentStatusList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*ComponentStatusList), err
return obj.(*v1.ComponentStatusList), err
}
func (s *componentStatusClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*ComponentStatusList, error) {
func (s *componentStatusClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ComponentStatusList, error) {
obj, err := s.objectClient.ListNamespaced(namespace, opts)
return obj.(*ComponentStatusList), err
return obj.(*v1.ComponentStatusList), err
}
func (s *componentStatusClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {

View File

@ -50,12 +50,6 @@ func NewConfigMap(namespace, name string, obj v1.ConfigMap) *v1.ConfigMap {
return &obj
}
type ConfigMapList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []v1.ConfigMap `json:"items"`
}
type ConfigMapHandlerFunc func(key string, obj *v1.ConfigMap) (runtime.Object, error)
type ConfigMapChangeHandlerFunc func(obj *v1.ConfigMap) (runtime.Object, error)
@ -75,8 +69,6 @@ type ConfigMapController interface {
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ConfigMapHandlerFunc)
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, after time.Duration)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type ConfigMapInterface interface {
@ -87,8 +79,8 @@ type ConfigMapInterface interface {
Update(*v1.ConfigMap) (*v1.ConfigMap, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*ConfigMapList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*ConfigMapList, error)
List(opts metav1.ListOptions) (*v1.ConfigMapList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ConfigMapList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() ConfigMapController
@ -127,7 +119,7 @@ func (l *configMapLister) Get(namespace, name string) (*v1.ConfigMap, error) {
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: ConfigMapGroupVersionKind.Group,
Resource: "configMap",
Resource: ConfigMapGroupVersionResource.Resource,
}, key)
}
return obj.(*v1.ConfigMap), nil
@ -207,29 +199,16 @@ func (c configMapFactory) Object() runtime.Object {
}
func (c configMapFactory) List() runtime.Object {
return &ConfigMapList{}
return &v1.ConfigMapList{}
}
func (s *configMapClient) Controller() ConfigMapController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.configMapControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(ConfigMapGroupVersionKind.Kind+"Controller",
s.objectClient)
s.client.controllerFactory.ForResourceKind(ConfigMapGroupVersionResource, ConfigMapGroupVersionKind.Kind, true))
c = &configMapController{
return &configMapController{
GenericController: genericController,
}
s.client.configMapControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type configMapClient struct {
@ -263,6 +242,11 @@ func (s *configMapClient) Update(o *v1.ConfigMap) (*v1.ConfigMap, error) {
return obj.(*v1.ConfigMap), err
}
func (s *configMapClient) UpdateStatus(o *v1.ConfigMap) (*v1.ConfigMap, error) {
obj, err := s.objectClient.UpdateStatus(o.Name, o)
return obj.(*v1.ConfigMap), err
}
func (s *configMapClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
@ -271,14 +255,14 @@ func (s *configMapClient) DeleteNamespaced(namespace, name string, options *meta
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *configMapClient) List(opts metav1.ListOptions) (*ConfigMapList, error) {
func (s *configMapClient) List(opts metav1.ListOptions) (*v1.ConfigMapList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*ConfigMapList), err
return obj.(*v1.ConfigMapList), err
}
func (s *configMapClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*ConfigMapList, error) {
func (s *configMapClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ConfigMapList, error) {
obj, err := s.objectClient.ListNamespaced(namespace, opts)
return obj.(*ConfigMapList), err
return obj.(*v1.ConfigMapList), err
}
func (s *configMapClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {

View File

@ -1,468 +0,0 @@
package v1
import (
corev1 "k8s.io/api/core/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ComponentStatusList) DeepCopyInto(out *ComponentStatusList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]corev1.ComponentStatus, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentStatusList.
func (in *ComponentStatusList) DeepCopy() *ComponentStatusList {
if in == nil {
return nil
}
out := new(ComponentStatusList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ComponentStatusList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ConfigMapList) DeepCopyInto(out *ConfigMapList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]corev1.ConfigMap, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapList.
func (in *ConfigMapList) DeepCopy() *ConfigMapList {
if in == nil {
return nil
}
out := new(ConfigMapList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ConfigMapList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EndpointsList) DeepCopyInto(out *EndpointsList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]corev1.Endpoints, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointsList.
func (in *EndpointsList) DeepCopy() *EndpointsList {
if in == nil {
return nil
}
out := new(EndpointsList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *EndpointsList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EventList) DeepCopyInto(out *EventList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]corev1.Event, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventList.
func (in *EventList) DeepCopy() *EventList {
if in == nil {
return nil
}
out := new(EventList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *EventList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *LimitRangeList) DeepCopyInto(out *LimitRangeList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]corev1.LimitRange, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LimitRangeList.
func (in *LimitRangeList) DeepCopy() *LimitRangeList {
if in == nil {
return nil
}
out := new(LimitRangeList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *LimitRangeList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NamespaceList) DeepCopyInto(out *NamespaceList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]corev1.Namespace, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceList.
func (in *NamespaceList) DeepCopy() *NamespaceList {
if in == nil {
return nil
}
out := new(NamespaceList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *NamespaceList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NodeList) DeepCopyInto(out *NodeList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]corev1.Node, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeList.
func (in *NodeList) DeepCopy() *NodeList {
if in == nil {
return nil
}
out := new(NodeList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *NodeList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PersistentVolumeClaimList) DeepCopyInto(out *PersistentVolumeClaimList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]corev1.PersistentVolumeClaim, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeClaimList.
func (in *PersistentVolumeClaimList) DeepCopy() *PersistentVolumeClaimList {
if in == nil {
return nil
}
out := new(PersistentVolumeClaimList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *PersistentVolumeClaimList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodList) DeepCopyInto(out *PodList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]corev1.Pod, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodList.
func (in *PodList) DeepCopy() *PodList {
if in == nil {
return nil
}
out := new(PodList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *PodList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ReplicationControllerList) DeepCopyInto(out *ReplicationControllerList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]corev1.ReplicationController, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicationControllerList.
func (in *ReplicationControllerList) DeepCopy() *ReplicationControllerList {
if in == nil {
return nil
}
out := new(ReplicationControllerList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ReplicationControllerList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceQuotaList) DeepCopyInto(out *ResourceQuotaList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]corev1.ResourceQuota, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuotaList.
func (in *ResourceQuotaList) DeepCopy() *ResourceQuotaList {
if in == nil {
return nil
}
out := new(ResourceQuotaList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ResourceQuotaList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SecretList) DeepCopyInto(out *SecretList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]corev1.Secret, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretList.
func (in *SecretList) DeepCopy() *SecretList {
if in == nil {
return nil
}
out := new(SecretList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *SecretList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ServiceAccountList) DeepCopyInto(out *ServiceAccountList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]corev1.ServiceAccount, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountList.
func (in *ServiceAccountList) DeepCopy() *ServiceAccountList {
if in == nil {
return nil
}
out := new(ServiceAccountList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ServiceAccountList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ServiceList) DeepCopyInto(out *ServiceList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]corev1.Service, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceList.
func (in *ServiceList) DeepCopy() *ServiceList {
if in == nil {
return nil
}
out := new(ServiceList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ServiceList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}

View File

@ -50,12 +50,6 @@ func NewEndpoints(namespace, name string, obj v1.Endpoints) *v1.Endpoints {
return &obj
}
type EndpointsList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []v1.Endpoints `json:"items"`
}
type EndpointsHandlerFunc func(key string, obj *v1.Endpoints) (runtime.Object, error)
type EndpointsChangeHandlerFunc func(obj *v1.Endpoints) (runtime.Object, error)
@ -75,8 +69,6 @@ type EndpointsController interface {
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler EndpointsHandlerFunc)
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, after time.Duration)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type EndpointsInterface interface {
@ -87,8 +79,8 @@ type EndpointsInterface interface {
Update(*v1.Endpoints) (*v1.Endpoints, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*EndpointsList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*EndpointsList, error)
List(opts metav1.ListOptions) (*v1.EndpointsList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.EndpointsList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() EndpointsController
@ -127,7 +119,7 @@ func (l *endpointsLister) Get(namespace, name string) (*v1.Endpoints, error) {
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: EndpointsGroupVersionKind.Group,
Resource: "endpoints",
Resource: EndpointsGroupVersionResource.Resource,
}, key)
}
return obj.(*v1.Endpoints), nil
@ -207,29 +199,16 @@ func (c endpointsFactory) Object() runtime.Object {
}
func (c endpointsFactory) List() runtime.Object {
return &EndpointsList{}
return &v1.EndpointsList{}
}
func (s *endpointsClient) Controller() EndpointsController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.endpointsControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(EndpointsGroupVersionKind.Kind+"Controller",
s.objectClient)
s.client.controllerFactory.ForResourceKind(EndpointsGroupVersionResource, EndpointsGroupVersionKind.Kind, true))
c = &endpointsController{
return &endpointsController{
GenericController: genericController,
}
s.client.endpointsControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type endpointsClient struct {
@ -263,6 +242,11 @@ func (s *endpointsClient) Update(o *v1.Endpoints) (*v1.Endpoints, error) {
return obj.(*v1.Endpoints), err
}
func (s *endpointsClient) UpdateStatus(o *v1.Endpoints) (*v1.Endpoints, error) {
obj, err := s.objectClient.UpdateStatus(o.Name, o)
return obj.(*v1.Endpoints), err
}
func (s *endpointsClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
@ -271,14 +255,14 @@ func (s *endpointsClient) DeleteNamespaced(namespace, name string, options *meta
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *endpointsClient) List(opts metav1.ListOptions) (*EndpointsList, error) {
func (s *endpointsClient) List(opts metav1.ListOptions) (*v1.EndpointsList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*EndpointsList), err
return obj.(*v1.EndpointsList), err
}
func (s *endpointsClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*EndpointsList, error) {
func (s *endpointsClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.EndpointsList, error) {
obj, err := s.objectClient.ListNamespaced(namespace, opts)
return obj.(*EndpointsList), err
return obj.(*v1.EndpointsList), err
}
func (s *endpointsClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {

View File

@ -49,12 +49,6 @@ func NewEvent(namespace, name string, obj v1.Event) *v1.Event {
return &obj
}
type EventList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []v1.Event `json:"items"`
}
type EventHandlerFunc func(key string, obj *v1.Event) (runtime.Object, error)
type EventChangeHandlerFunc func(obj *v1.Event) (runtime.Object, error)
@ -74,8 +68,6 @@ type EventController interface {
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler EventHandlerFunc)
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, after time.Duration)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type EventInterface interface {
@ -86,8 +78,8 @@ type EventInterface interface {
Update(*v1.Event) (*v1.Event, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*EventList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*EventList, error)
List(opts metav1.ListOptions) (*v1.EventList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.EventList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() EventController
@ -126,7 +118,7 @@ func (l *eventLister) Get(namespace, name string) (*v1.Event, error) {
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: EventGroupVersionKind.Group,
Resource: "event",
Resource: EventGroupVersionResource.Resource,
}, key)
}
return obj.(*v1.Event), nil
@ -206,29 +198,16 @@ func (c eventFactory) Object() runtime.Object {
}
func (c eventFactory) List() runtime.Object {
return &EventList{}
return &v1.EventList{}
}
func (s *eventClient) Controller() EventController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.eventControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(EventGroupVersionKind.Kind+"Controller",
s.objectClient)
s.client.controllerFactory.ForResourceKind(EventGroupVersionResource, EventGroupVersionKind.Kind, false))
c = &eventController{
return &eventController{
GenericController: genericController,
}
s.client.eventControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type eventClient struct {
@ -262,6 +241,11 @@ func (s *eventClient) Update(o *v1.Event) (*v1.Event, error) {
return obj.(*v1.Event), err
}
func (s *eventClient) UpdateStatus(o *v1.Event) (*v1.Event, error) {
obj, err := s.objectClient.UpdateStatus(o.Name, o)
return obj.(*v1.Event), err
}
func (s *eventClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
@ -270,14 +254,14 @@ func (s *eventClient) DeleteNamespaced(namespace, name string, options *metav1.D
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *eventClient) List(opts metav1.ListOptions) (*EventList, error) {
func (s *eventClient) List(opts metav1.ListOptions) (*v1.EventList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*EventList), err
return obj.(*v1.EventList), err
}
func (s *eventClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*EventList, error) {
func (s *eventClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.EventList, error) {
obj, err := s.objectClient.ListNamespaced(namespace, opts)
return obj.(*EventList), err
return obj.(*v1.EventList), err
}
func (s *eventClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {

View File

@ -1,25 +1,12 @@
package v1
import (
"context"
"sync"
"github.com/rancher/norman/controller"
"github.com/rancher/lasso/pkg/client"
"github.com/rancher/lasso/pkg/controller"
"github.com/rancher/norman/objectclient"
"github.com/rancher/norman/objectclient/dynamic"
"github.com/rancher/norman/restwatch"
"k8s.io/client-go/rest"
)
type (
contextKeyType struct{}
contextClientsKeyType struct{}
)
type Interface interface {
RESTClient() rest.Interface
controller.Starter
NodesGetter
ComponentStatusesGetter
NamespacesGetter
@ -37,74 +24,24 @@ type Interface interface {
}
type Client struct {
sync.Mutex
restClient rest.Interface
starters []controller.Starter
nodeControllers map[string]NodeController
componentStatusControllers map[string]ComponentStatusController
namespaceControllers map[string]NamespaceController
eventControllers map[string]EventController
endpointsControllers map[string]EndpointsController
persistentVolumeClaimControllers map[string]PersistentVolumeClaimController
podControllers map[string]PodController
serviceControllers map[string]ServiceController
secretControllers map[string]SecretController
configMapControllers map[string]ConfigMapController
serviceAccountControllers map[string]ServiceAccountController
replicationControllerControllers map[string]ReplicationControllerController
resourceQuotaControllers map[string]ResourceQuotaController
limitRangeControllers map[string]LimitRangeController
controllerFactory controller.SharedControllerFactory
clientFactory client.SharedClientFactory
}
func NewForConfig(config rest.Config) (Interface, error) {
if config.NegotiatedSerializer == nil {
config.NegotiatedSerializer = dynamic.NegotiatedSerializer
}
restClient, err := restwatch.UnversionedRESTClientFor(&config)
if err != nil {
return nil, err
}
func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) {
return &Client{
restClient: restClient,
nodeControllers: map[string]NodeController{},
componentStatusControllers: map[string]ComponentStatusController{},
namespaceControllers: map[string]NamespaceController{},
eventControllers: map[string]EventController{},
endpointsControllers: map[string]EndpointsController{},
persistentVolumeClaimControllers: map[string]PersistentVolumeClaimController{},
podControllers: map[string]PodController{},
serviceControllers: map[string]ServiceController{},
secretControllers: map[string]SecretController{},
configMapControllers: map[string]ConfigMapController{},
serviceAccountControllers: map[string]ServiceAccountController{},
replicationControllerControllers: map[string]ReplicationControllerController{},
resourceQuotaControllers: map[string]ResourceQuotaController{},
limitRangeControllers: map[string]LimitRangeController{},
controllerFactory: factory,
clientFactory: factory.SharedCacheFactory().SharedClientFactory(),
}, nil
}
func (c *Client) RESTClient() rest.Interface {
return c.restClient
}
func (c *Client) Sync(ctx context.Context) error {
return controller.Sync(ctx, c.starters...)
}
func (c *Client) Start(ctx context.Context, threadiness int) error {
return controller.Start(ctx, threadiness, c.starters...)
}
type NodesGetter interface {
Nodes(namespace string) NodeInterface
}
func (c *Client) Nodes(namespace string) NodeInterface {
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &NodeResource, NodeGroupVersionKind, nodeFactory{})
sharedClient := c.clientFactory.ForResourceKind(NodeGroupVersionResource, NodeGroupVersionKind.Kind, false)
objectClient := objectclient.NewObjectClient(namespace, sharedClient, &NodeResource, NodeGroupVersionKind, nodeFactory{})
return &nodeClient{
ns: namespace,
client: c,
@ -117,7 +54,8 @@ type ComponentStatusesGetter interface {
}
func (c *Client) ComponentStatuses(namespace string) ComponentStatusInterface {
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ComponentStatusResource, ComponentStatusGroupVersionKind, componentStatusFactory{})
sharedClient := c.clientFactory.ForResourceKind(ComponentStatusGroupVersionResource, ComponentStatusGroupVersionKind.Kind, false)
objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ComponentStatusResource, ComponentStatusGroupVersionKind, componentStatusFactory{})
return &componentStatusClient{
ns: namespace,
client: c,
@ -130,7 +68,8 @@ type NamespacesGetter interface {
}
func (c *Client) Namespaces(namespace string) NamespaceInterface {
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &NamespaceResource, NamespaceGroupVersionKind, namespaceFactory{})
sharedClient := c.clientFactory.ForResourceKind(NamespaceGroupVersionResource, NamespaceGroupVersionKind.Kind, false)
objectClient := objectclient.NewObjectClient(namespace, sharedClient, &NamespaceResource, NamespaceGroupVersionKind, namespaceFactory{})
return &namespaceClient{
ns: namespace,
client: c,
@ -143,7 +82,8 @@ type EventsGetter interface {
}
func (c *Client) Events(namespace string) EventInterface {
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &EventResource, EventGroupVersionKind, eventFactory{})
sharedClient := c.clientFactory.ForResourceKind(EventGroupVersionResource, EventGroupVersionKind.Kind, false)
objectClient := objectclient.NewObjectClient(namespace, sharedClient, &EventResource, EventGroupVersionKind, eventFactory{})
return &eventClient{
ns: namespace,
client: c,
@ -156,7 +96,8 @@ type EndpointsGetter interface {
}
func (c *Client) Endpoints(namespace string) EndpointsInterface {
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &EndpointsResource, EndpointsGroupVersionKind, endpointsFactory{})
sharedClient := c.clientFactory.ForResourceKind(EndpointsGroupVersionResource, EndpointsGroupVersionKind.Kind, true)
objectClient := objectclient.NewObjectClient(namespace, sharedClient, &EndpointsResource, EndpointsGroupVersionKind, endpointsFactory{})
return &endpointsClient{
ns: namespace,
client: c,
@ -169,7 +110,8 @@ type PersistentVolumeClaimsGetter interface {
}
func (c *Client) PersistentVolumeClaims(namespace string) PersistentVolumeClaimInterface {
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &PersistentVolumeClaimResource, PersistentVolumeClaimGroupVersionKind, persistentVolumeClaimFactory{})
sharedClient := c.clientFactory.ForResourceKind(PersistentVolumeClaimGroupVersionResource, PersistentVolumeClaimGroupVersionKind.Kind, true)
objectClient := objectclient.NewObjectClient(namespace, sharedClient, &PersistentVolumeClaimResource, PersistentVolumeClaimGroupVersionKind, persistentVolumeClaimFactory{})
return &persistentVolumeClaimClient{
ns: namespace,
client: c,
@ -182,7 +124,8 @@ type PodsGetter interface {
}
func (c *Client) Pods(namespace string) PodInterface {
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &PodResource, PodGroupVersionKind, podFactory{})
sharedClient := c.clientFactory.ForResourceKind(PodGroupVersionResource, PodGroupVersionKind.Kind, true)
objectClient := objectclient.NewObjectClient(namespace, sharedClient, &PodResource, PodGroupVersionKind, podFactory{})
return &podClient{
ns: namespace,
client: c,
@ -195,7 +138,8 @@ type ServicesGetter interface {
}
func (c *Client) Services(namespace string) ServiceInterface {
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ServiceResource, ServiceGroupVersionKind, serviceFactory{})
sharedClient := c.clientFactory.ForResourceKind(ServiceGroupVersionResource, ServiceGroupVersionKind.Kind, true)
objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ServiceResource, ServiceGroupVersionKind, serviceFactory{})
return &serviceClient{
ns: namespace,
client: c,
@ -208,7 +152,8 @@ type SecretsGetter interface {
}
func (c *Client) Secrets(namespace string) SecretInterface {
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &SecretResource, SecretGroupVersionKind, secretFactory{})
sharedClient := c.clientFactory.ForResourceKind(SecretGroupVersionResource, SecretGroupVersionKind.Kind, true)
objectClient := objectclient.NewObjectClient(namespace, sharedClient, &SecretResource, SecretGroupVersionKind, secretFactory{})
return &secretClient{
ns: namespace,
client: c,
@ -221,7 +166,8 @@ type ConfigMapsGetter interface {
}
func (c *Client) ConfigMaps(namespace string) ConfigMapInterface {
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ConfigMapResource, ConfigMapGroupVersionKind, configMapFactory{})
sharedClient := c.clientFactory.ForResourceKind(ConfigMapGroupVersionResource, ConfigMapGroupVersionKind.Kind, true)
objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ConfigMapResource, ConfigMapGroupVersionKind, configMapFactory{})
return &configMapClient{
ns: namespace,
client: c,
@ -234,7 +180,8 @@ type ServiceAccountsGetter interface {
}
func (c *Client) ServiceAccounts(namespace string) ServiceAccountInterface {
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ServiceAccountResource, ServiceAccountGroupVersionKind, serviceAccountFactory{})
sharedClient := c.clientFactory.ForResourceKind(ServiceAccountGroupVersionResource, ServiceAccountGroupVersionKind.Kind, true)
objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ServiceAccountResource, ServiceAccountGroupVersionKind, serviceAccountFactory{})
return &serviceAccountClient{
ns: namespace,
client: c,
@ -247,7 +194,8 @@ type ReplicationControllersGetter interface {
}
func (c *Client) ReplicationControllers(namespace string) ReplicationControllerInterface {
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ReplicationControllerResource, ReplicationControllerGroupVersionKind, replicationControllerFactory{})
sharedClient := c.clientFactory.ForResourceKind(ReplicationControllerGroupVersionResource, ReplicationControllerGroupVersionKind.Kind, true)
objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ReplicationControllerResource, ReplicationControllerGroupVersionKind, replicationControllerFactory{})
return &replicationControllerClient{
ns: namespace,
client: c,
@ -260,7 +208,8 @@ type ResourceQuotasGetter interface {
}
func (c *Client) ResourceQuotas(namespace string) ResourceQuotaInterface {
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ResourceQuotaResource, ResourceQuotaGroupVersionKind, resourceQuotaFactory{})
sharedClient := c.clientFactory.ForResourceKind(ResourceQuotaGroupVersionResource, ResourceQuotaGroupVersionKind.Kind, true)
objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ResourceQuotaResource, ResourceQuotaGroupVersionKind, resourceQuotaFactory{})
return &resourceQuotaClient{
ns: namespace,
client: c,
@ -273,7 +222,8 @@ type LimitRangesGetter interface {
}
func (c *Client) LimitRanges(namespace string) LimitRangeInterface {
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &LimitRangeResource, LimitRangeGroupVersionKind, limitRangeFactory{})
sharedClient := c.clientFactory.ForResourceKind(LimitRangeGroupVersionResource, LimitRangeGroupVersionKind.Kind, true)
objectClient := objectclient.NewObjectClient(namespace, sharedClient, &LimitRangeResource, LimitRangeGroupVersionKind, limitRangeFactory{})
return &limitRangeClient{
ns: namespace,
client: c,

View File

@ -50,12 +50,6 @@ func NewLimitRange(namespace, name string, obj v1.LimitRange) *v1.LimitRange {
return &obj
}
type LimitRangeList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []v1.LimitRange `json:"items"`
}
type LimitRangeHandlerFunc func(key string, obj *v1.LimitRange) (runtime.Object, error)
type LimitRangeChangeHandlerFunc func(obj *v1.LimitRange) (runtime.Object, error)
@ -75,8 +69,6 @@ type LimitRangeController interface {
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler LimitRangeHandlerFunc)
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, after time.Duration)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type LimitRangeInterface interface {
@ -87,8 +79,8 @@ type LimitRangeInterface interface {
Update(*v1.LimitRange) (*v1.LimitRange, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*LimitRangeList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*LimitRangeList, error)
List(opts metav1.ListOptions) (*v1.LimitRangeList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.LimitRangeList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() LimitRangeController
@ -127,7 +119,7 @@ func (l *limitRangeLister) Get(namespace, name string) (*v1.LimitRange, error) {
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: LimitRangeGroupVersionKind.Group,
Resource: "limitRange",
Resource: LimitRangeGroupVersionResource.Resource,
}, key)
}
return obj.(*v1.LimitRange), nil
@ -207,29 +199,16 @@ func (c limitRangeFactory) Object() runtime.Object {
}
func (c limitRangeFactory) List() runtime.Object {
return &LimitRangeList{}
return &v1.LimitRangeList{}
}
func (s *limitRangeClient) Controller() LimitRangeController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.limitRangeControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(LimitRangeGroupVersionKind.Kind+"Controller",
s.objectClient)
s.client.controllerFactory.ForResourceKind(LimitRangeGroupVersionResource, LimitRangeGroupVersionKind.Kind, true))
c = &limitRangeController{
return &limitRangeController{
GenericController: genericController,
}
s.client.limitRangeControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type limitRangeClient struct {
@ -263,6 +242,11 @@ func (s *limitRangeClient) Update(o *v1.LimitRange) (*v1.LimitRange, error) {
return obj.(*v1.LimitRange), err
}
func (s *limitRangeClient) UpdateStatus(o *v1.LimitRange) (*v1.LimitRange, error) {
obj, err := s.objectClient.UpdateStatus(o.Name, o)
return obj.(*v1.LimitRange), err
}
func (s *limitRangeClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
@ -271,14 +255,14 @@ func (s *limitRangeClient) DeleteNamespaced(namespace, name string, options *met
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *limitRangeClient) List(opts metav1.ListOptions) (*LimitRangeList, error) {
func (s *limitRangeClient) List(opts metav1.ListOptions) (*v1.LimitRangeList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*LimitRangeList), err
return obj.(*v1.LimitRangeList), err
}
func (s *limitRangeClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*LimitRangeList, error) {
func (s *limitRangeClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.LimitRangeList, error) {
obj, err := s.objectClient.ListNamespaced(namespace, opts)
return obj.(*LimitRangeList), err
return obj.(*v1.LimitRangeList), err
}
func (s *limitRangeClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {

View File

@ -49,12 +49,6 @@ func NewNamespace(namespace, name string, obj v1.Namespace) *v1.Namespace {
return &obj
}
type NamespaceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []v1.Namespace `json:"items"`
}
type NamespaceHandlerFunc func(key string, obj *v1.Namespace) (runtime.Object, error)
type NamespaceChangeHandlerFunc func(obj *v1.Namespace) (runtime.Object, error)
@ -74,8 +68,6 @@ type NamespaceController interface {
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NamespaceHandlerFunc)
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, after time.Duration)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type NamespaceInterface interface {
@ -86,8 +78,8 @@ type NamespaceInterface interface {
Update(*v1.Namespace) (*v1.Namespace, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*NamespaceList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*NamespaceList, error)
List(opts metav1.ListOptions) (*v1.NamespaceList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.NamespaceList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() NamespaceController
@ -126,7 +118,7 @@ func (l *namespaceLister) Get(namespace, name string) (*v1.Namespace, error) {
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: NamespaceGroupVersionKind.Group,
Resource: "namespace",
Resource: NamespaceGroupVersionResource.Resource,
}, key)
}
return obj.(*v1.Namespace), nil
@ -206,29 +198,16 @@ func (c namespaceFactory) Object() runtime.Object {
}
func (c namespaceFactory) List() runtime.Object {
return &NamespaceList{}
return &v1.NamespaceList{}
}
func (s *namespaceClient) Controller() NamespaceController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.namespaceControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(NamespaceGroupVersionKind.Kind+"Controller",
s.objectClient)
s.client.controllerFactory.ForResourceKind(NamespaceGroupVersionResource, NamespaceGroupVersionKind.Kind, false))
c = &namespaceController{
return &namespaceController{
GenericController: genericController,
}
s.client.namespaceControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type namespaceClient struct {
@ -262,6 +241,11 @@ func (s *namespaceClient) Update(o *v1.Namespace) (*v1.Namespace, error) {
return obj.(*v1.Namespace), err
}
func (s *namespaceClient) UpdateStatus(o *v1.Namespace) (*v1.Namespace, error) {
obj, err := s.objectClient.UpdateStatus(o.Name, o)
return obj.(*v1.Namespace), err
}
func (s *namespaceClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
@ -270,14 +254,14 @@ func (s *namespaceClient) DeleteNamespaced(namespace, name string, options *meta
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *namespaceClient) List(opts metav1.ListOptions) (*NamespaceList, error) {
func (s *namespaceClient) List(opts metav1.ListOptions) (*v1.NamespaceList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*NamespaceList), err
return obj.(*v1.NamespaceList), err
}
func (s *namespaceClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*NamespaceList, error) {
func (s *namespaceClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.NamespaceList, error) {
obj, err := s.objectClient.ListNamespaced(namespace, opts)
return obj.(*NamespaceList), err
return obj.(*v1.NamespaceList), err
}
func (s *namespaceClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {

View File

@ -49,12 +49,6 @@ func NewNode(namespace, name string, obj v1.Node) *v1.Node {
return &obj
}
type NodeList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []v1.Node `json:"items"`
}
type NodeHandlerFunc func(key string, obj *v1.Node) (runtime.Object, error)
type NodeChangeHandlerFunc func(obj *v1.Node) (runtime.Object, error)
@ -74,8 +68,6 @@ type NodeController interface {
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NodeHandlerFunc)
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, after time.Duration)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type NodeInterface interface {
@ -86,8 +78,8 @@ type NodeInterface interface {
Update(*v1.Node) (*v1.Node, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*NodeList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*NodeList, error)
List(opts metav1.ListOptions) (*v1.NodeList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.NodeList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() NodeController
@ -126,7 +118,7 @@ func (l *nodeLister) Get(namespace, name string) (*v1.Node, error) {
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: NodeGroupVersionKind.Group,
Resource: "node",
Resource: NodeGroupVersionResource.Resource,
}, key)
}
return obj.(*v1.Node), nil
@ -206,29 +198,16 @@ func (c nodeFactory) Object() runtime.Object {
}
func (c nodeFactory) List() runtime.Object {
return &NodeList{}
return &v1.NodeList{}
}
func (s *nodeClient) Controller() NodeController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.nodeControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(NodeGroupVersionKind.Kind+"Controller",
s.objectClient)
s.client.controllerFactory.ForResourceKind(NodeGroupVersionResource, NodeGroupVersionKind.Kind, false))
c = &nodeController{
return &nodeController{
GenericController: genericController,
}
s.client.nodeControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type nodeClient struct {
@ -262,6 +241,11 @@ func (s *nodeClient) Update(o *v1.Node) (*v1.Node, error) {
return obj.(*v1.Node), err
}
func (s *nodeClient) UpdateStatus(o *v1.Node) (*v1.Node, error) {
obj, err := s.objectClient.UpdateStatus(o.Name, o)
return obj.(*v1.Node), err
}
func (s *nodeClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
@ -270,14 +254,14 @@ func (s *nodeClient) DeleteNamespaced(namespace, name string, options *metav1.De
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *nodeClient) List(opts metav1.ListOptions) (*NodeList, error) {
func (s *nodeClient) List(opts metav1.ListOptions) (*v1.NodeList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*NodeList), err
return obj.(*v1.NodeList), err
}
func (s *nodeClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*NodeList, error) {
func (s *nodeClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.NodeList, error) {
obj, err := s.objectClient.ListNamespaced(namespace, opts)
return obj.(*NodeList), err
return obj.(*v1.NodeList), err
}
func (s *nodeClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {

View File

@ -50,12 +50,6 @@ func NewPersistentVolumeClaim(namespace, name string, obj v1.PersistentVolumeCla
return &obj
}
type PersistentVolumeClaimList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []v1.PersistentVolumeClaim `json:"items"`
}
type PersistentVolumeClaimHandlerFunc func(key string, obj *v1.PersistentVolumeClaim) (runtime.Object, error)
type PersistentVolumeClaimChangeHandlerFunc func(obj *v1.PersistentVolumeClaim) (runtime.Object, error)
@ -75,8 +69,6 @@ type PersistentVolumeClaimController interface {
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler PersistentVolumeClaimHandlerFunc)
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, after time.Duration)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type PersistentVolumeClaimInterface interface {
@ -87,8 +79,8 @@ type PersistentVolumeClaimInterface interface {
Update(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*PersistentVolumeClaimList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*PersistentVolumeClaimList, error)
List(opts metav1.ListOptions) (*v1.PersistentVolumeClaimList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.PersistentVolumeClaimList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() PersistentVolumeClaimController
@ -127,7 +119,7 @@ func (l *persistentVolumeClaimLister) Get(namespace, name string) (*v1.Persisten
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: PersistentVolumeClaimGroupVersionKind.Group,
Resource: "persistentVolumeClaim",
Resource: PersistentVolumeClaimGroupVersionResource.Resource,
}, key)
}
return obj.(*v1.PersistentVolumeClaim), nil
@ -207,29 +199,16 @@ func (c persistentVolumeClaimFactory) Object() runtime.Object {
}
func (c persistentVolumeClaimFactory) List() runtime.Object {
return &PersistentVolumeClaimList{}
return &v1.PersistentVolumeClaimList{}
}
func (s *persistentVolumeClaimClient) Controller() PersistentVolumeClaimController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.persistentVolumeClaimControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(PersistentVolumeClaimGroupVersionKind.Kind+"Controller",
s.objectClient)
s.client.controllerFactory.ForResourceKind(PersistentVolumeClaimGroupVersionResource, PersistentVolumeClaimGroupVersionKind.Kind, true))
c = &persistentVolumeClaimController{
return &persistentVolumeClaimController{
GenericController: genericController,
}
s.client.persistentVolumeClaimControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type persistentVolumeClaimClient struct {
@ -263,6 +242,11 @@ func (s *persistentVolumeClaimClient) Update(o *v1.PersistentVolumeClaim) (*v1.P
return obj.(*v1.PersistentVolumeClaim), err
}
func (s *persistentVolumeClaimClient) UpdateStatus(o *v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) {
obj, err := s.objectClient.UpdateStatus(o.Name, o)
return obj.(*v1.PersistentVolumeClaim), err
}
func (s *persistentVolumeClaimClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
@ -271,14 +255,14 @@ func (s *persistentVolumeClaimClient) DeleteNamespaced(namespace, name string, o
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *persistentVolumeClaimClient) List(opts metav1.ListOptions) (*PersistentVolumeClaimList, error) {
func (s *persistentVolumeClaimClient) List(opts metav1.ListOptions) (*v1.PersistentVolumeClaimList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*PersistentVolumeClaimList), err
return obj.(*v1.PersistentVolumeClaimList), err
}
func (s *persistentVolumeClaimClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*PersistentVolumeClaimList, error) {
func (s *persistentVolumeClaimClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.PersistentVolumeClaimList, error) {
obj, err := s.objectClient.ListNamespaced(namespace, opts)
return obj.(*PersistentVolumeClaimList), err
return obj.(*v1.PersistentVolumeClaimList), err
}
func (s *persistentVolumeClaimClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {

View File

@ -50,12 +50,6 @@ func NewPod(namespace, name string, obj v1.Pod) *v1.Pod {
return &obj
}
type PodList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []v1.Pod `json:"items"`
}
type PodHandlerFunc func(key string, obj *v1.Pod) (runtime.Object, error)
type PodChangeHandlerFunc func(obj *v1.Pod) (runtime.Object, error)
@ -75,8 +69,6 @@ type PodController interface {
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler PodHandlerFunc)
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, after time.Duration)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type PodInterface interface {
@ -87,8 +79,8 @@ type PodInterface interface {
Update(*v1.Pod) (*v1.Pod, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*PodList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*PodList, error)
List(opts metav1.ListOptions) (*v1.PodList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.PodList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() PodController
@ -127,7 +119,7 @@ func (l *podLister) Get(namespace, name string) (*v1.Pod, error) {
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: PodGroupVersionKind.Group,
Resource: "pod",
Resource: PodGroupVersionResource.Resource,
}, key)
}
return obj.(*v1.Pod), nil
@ -207,29 +199,16 @@ func (c podFactory) Object() runtime.Object {
}
func (c podFactory) List() runtime.Object {
return &PodList{}
return &v1.PodList{}
}
func (s *podClient) Controller() PodController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.podControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(PodGroupVersionKind.Kind+"Controller",
s.objectClient)
s.client.controllerFactory.ForResourceKind(PodGroupVersionResource, PodGroupVersionKind.Kind, true))
c = &podController{
return &podController{
GenericController: genericController,
}
s.client.podControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type podClient struct {
@ -263,6 +242,11 @@ func (s *podClient) Update(o *v1.Pod) (*v1.Pod, error) {
return obj.(*v1.Pod), err
}
func (s *podClient) UpdateStatus(o *v1.Pod) (*v1.Pod, error) {
obj, err := s.objectClient.UpdateStatus(o.Name, o)
return obj.(*v1.Pod), err
}
func (s *podClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
@ -271,14 +255,14 @@ func (s *podClient) DeleteNamespaced(namespace, name string, options *metav1.Del
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *podClient) List(opts metav1.ListOptions) (*PodList, error) {
func (s *podClient) List(opts metav1.ListOptions) (*v1.PodList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*PodList), err
return obj.(*v1.PodList), err
}
func (s *podClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*PodList, error) {
func (s *podClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.PodList, error) {
obj, err := s.objectClient.ListNamespaced(namespace, opts)
return obj.(*PodList), err
return obj.(*v1.PodList), err
}
func (s *podClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {

View File

@ -50,12 +50,6 @@ func NewReplicationController(namespace, name string, obj v1.ReplicationControll
return &obj
}
type ReplicationControllerList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []v1.ReplicationController `json:"items"`
}
type ReplicationControllerHandlerFunc func(key string, obj *v1.ReplicationController) (runtime.Object, error)
type ReplicationControllerChangeHandlerFunc func(obj *v1.ReplicationController) (runtime.Object, error)
@ -75,8 +69,6 @@ type ReplicationControllerController interface {
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ReplicationControllerHandlerFunc)
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, after time.Duration)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type ReplicationControllerInterface interface {
@ -87,8 +79,8 @@ type ReplicationControllerInterface interface {
Update(*v1.ReplicationController) (*v1.ReplicationController, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*ReplicationControllerList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*ReplicationControllerList, error)
List(opts metav1.ListOptions) (*v1.ReplicationControllerList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ReplicationControllerList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() ReplicationControllerController
@ -127,7 +119,7 @@ func (l *replicationControllerLister) Get(namespace, name string) (*v1.Replicati
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: ReplicationControllerGroupVersionKind.Group,
Resource: "replicationController",
Resource: ReplicationControllerGroupVersionResource.Resource,
}, key)
}
return obj.(*v1.ReplicationController), nil
@ -207,29 +199,16 @@ func (c replicationControllerFactory) Object() runtime.Object {
}
func (c replicationControllerFactory) List() runtime.Object {
return &ReplicationControllerList{}
return &v1.ReplicationControllerList{}
}
func (s *replicationControllerClient) Controller() ReplicationControllerController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.replicationControllerControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(ReplicationControllerGroupVersionKind.Kind+"Controller",
s.objectClient)
s.client.controllerFactory.ForResourceKind(ReplicationControllerGroupVersionResource, ReplicationControllerGroupVersionKind.Kind, true))
c = &replicationControllerController{
return &replicationControllerController{
GenericController: genericController,
}
s.client.replicationControllerControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type replicationControllerClient struct {
@ -263,6 +242,11 @@ func (s *replicationControllerClient) Update(o *v1.ReplicationController) (*v1.R
return obj.(*v1.ReplicationController), err
}
func (s *replicationControllerClient) UpdateStatus(o *v1.ReplicationController) (*v1.ReplicationController, error) {
obj, err := s.objectClient.UpdateStatus(o.Name, o)
return obj.(*v1.ReplicationController), err
}
func (s *replicationControllerClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
@ -271,14 +255,14 @@ func (s *replicationControllerClient) DeleteNamespaced(namespace, name string, o
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *replicationControllerClient) List(opts metav1.ListOptions) (*ReplicationControllerList, error) {
func (s *replicationControllerClient) List(opts metav1.ListOptions) (*v1.ReplicationControllerList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*ReplicationControllerList), err
return obj.(*v1.ReplicationControllerList), err
}
func (s *replicationControllerClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*ReplicationControllerList, error) {
func (s *replicationControllerClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ReplicationControllerList, error) {
obj, err := s.objectClient.ListNamespaced(namespace, opts)
return obj.(*ReplicationControllerList), err
return obj.(*v1.ReplicationControllerList), err
}
func (s *replicationControllerClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {

View File

@ -50,12 +50,6 @@ func NewResourceQuota(namespace, name string, obj v1.ResourceQuota) *v1.Resource
return &obj
}
type ResourceQuotaList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []v1.ResourceQuota `json:"items"`
}
type ResourceQuotaHandlerFunc func(key string, obj *v1.ResourceQuota) (runtime.Object, error)
type ResourceQuotaChangeHandlerFunc func(obj *v1.ResourceQuota) (runtime.Object, error)
@ -75,8 +69,6 @@ type ResourceQuotaController interface {
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ResourceQuotaHandlerFunc)
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, after time.Duration)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type ResourceQuotaInterface interface {
@ -87,8 +79,8 @@ type ResourceQuotaInterface interface {
Update(*v1.ResourceQuota) (*v1.ResourceQuota, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*ResourceQuotaList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*ResourceQuotaList, error)
List(opts metav1.ListOptions) (*v1.ResourceQuotaList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ResourceQuotaList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() ResourceQuotaController
@ -127,7 +119,7 @@ func (l *resourceQuotaLister) Get(namespace, name string) (*v1.ResourceQuota, er
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: ResourceQuotaGroupVersionKind.Group,
Resource: "resourceQuota",
Resource: ResourceQuotaGroupVersionResource.Resource,
}, key)
}
return obj.(*v1.ResourceQuota), nil
@ -207,29 +199,16 @@ func (c resourceQuotaFactory) Object() runtime.Object {
}
func (c resourceQuotaFactory) List() runtime.Object {
return &ResourceQuotaList{}
return &v1.ResourceQuotaList{}
}
func (s *resourceQuotaClient) Controller() ResourceQuotaController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.resourceQuotaControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(ResourceQuotaGroupVersionKind.Kind+"Controller",
s.objectClient)
s.client.controllerFactory.ForResourceKind(ResourceQuotaGroupVersionResource, ResourceQuotaGroupVersionKind.Kind, true))
c = &resourceQuotaController{
return &resourceQuotaController{
GenericController: genericController,
}
s.client.resourceQuotaControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type resourceQuotaClient struct {
@ -263,6 +242,11 @@ func (s *resourceQuotaClient) Update(o *v1.ResourceQuota) (*v1.ResourceQuota, er
return obj.(*v1.ResourceQuota), err
}
func (s *resourceQuotaClient) UpdateStatus(o *v1.ResourceQuota) (*v1.ResourceQuota, error) {
obj, err := s.objectClient.UpdateStatus(o.Name, o)
return obj.(*v1.ResourceQuota), err
}
func (s *resourceQuotaClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
@ -271,14 +255,14 @@ func (s *resourceQuotaClient) DeleteNamespaced(namespace, name string, options *
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *resourceQuotaClient) List(opts metav1.ListOptions) (*ResourceQuotaList, error) {
func (s *resourceQuotaClient) List(opts metav1.ListOptions) (*v1.ResourceQuotaList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*ResourceQuotaList), err
return obj.(*v1.ResourceQuotaList), err
}
func (s *resourceQuotaClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*ResourceQuotaList, error) {
func (s *resourceQuotaClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ResourceQuotaList, error) {
obj, err := s.objectClient.ListNamespaced(namespace, opts)
return obj.(*ResourceQuotaList), err
return obj.(*v1.ResourceQuotaList), err
}
func (s *resourceQuotaClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {

View File

@ -1,8 +1,6 @@
package v1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
@ -23,32 +21,3 @@ func Kind(kind string) schema.GroupKind {
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
var (
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
AddToScheme = SchemeBuilder.AddToScheme
)
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
// TODO this gets cleaned up when the types are fixed
scheme.AddKnownTypes(SchemeGroupVersion,
&NodeList{},
&ComponentStatusList{},
&NamespaceList{},
&EventList{},
&EndpointsList{},
&PersistentVolumeClaimList{},
&PodList{},
&ServiceList{},
&SecretList{},
&ConfigMapList{},
&ServiceAccountList{},
&ReplicationControllerList{},
&ResourceQuotaList{},
&LimitRangeList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}

View File

@ -50,12 +50,6 @@ func NewSecret(namespace, name string, obj v1.Secret) *v1.Secret {
return &obj
}
type SecretList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []v1.Secret `json:"items"`
}
type SecretHandlerFunc func(key string, obj *v1.Secret) (runtime.Object, error)
type SecretChangeHandlerFunc func(obj *v1.Secret) (runtime.Object, error)
@ -75,8 +69,6 @@ type SecretController interface {
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler SecretHandlerFunc)
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, after time.Duration)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type SecretInterface interface {
@ -87,8 +79,8 @@ type SecretInterface interface {
Update(*v1.Secret) (*v1.Secret, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*SecretList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*SecretList, error)
List(opts metav1.ListOptions) (*v1.SecretList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.SecretList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() SecretController
@ -127,7 +119,7 @@ func (l *secretLister) Get(namespace, name string) (*v1.Secret, error) {
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: SecretGroupVersionKind.Group,
Resource: "secret",
Resource: SecretGroupVersionResource.Resource,
}, key)
}
return obj.(*v1.Secret), nil
@ -207,29 +199,16 @@ func (c secretFactory) Object() runtime.Object {
}
func (c secretFactory) List() runtime.Object {
return &SecretList{}
return &v1.SecretList{}
}
func (s *secretClient) Controller() SecretController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.secretControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(SecretGroupVersionKind.Kind+"Controller",
s.objectClient)
s.client.controllerFactory.ForResourceKind(SecretGroupVersionResource, SecretGroupVersionKind.Kind, true))
c = &secretController{
return &secretController{
GenericController: genericController,
}
s.client.secretControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type secretClient struct {
@ -263,6 +242,11 @@ func (s *secretClient) Update(o *v1.Secret) (*v1.Secret, error) {
return obj.(*v1.Secret), err
}
func (s *secretClient) UpdateStatus(o *v1.Secret) (*v1.Secret, error) {
obj, err := s.objectClient.UpdateStatus(o.Name, o)
return obj.(*v1.Secret), err
}
func (s *secretClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
@ -271,14 +255,14 @@ func (s *secretClient) DeleteNamespaced(namespace, name string, options *metav1.
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *secretClient) List(opts metav1.ListOptions) (*SecretList, error) {
func (s *secretClient) List(opts metav1.ListOptions) (*v1.SecretList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*SecretList), err
return obj.(*v1.SecretList), err
}
func (s *secretClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*SecretList, error) {
func (s *secretClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.SecretList, error) {
obj, err := s.objectClient.ListNamespaced(namespace, opts)
return obj.(*SecretList), err
return obj.(*v1.SecretList), err
}
func (s *secretClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {

View File

@ -50,12 +50,6 @@ func NewServiceAccount(namespace, name string, obj v1.ServiceAccount) *v1.Servic
return &obj
}
type ServiceAccountList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []v1.ServiceAccount `json:"items"`
}
type ServiceAccountHandlerFunc func(key string, obj *v1.ServiceAccount) (runtime.Object, error)
type ServiceAccountChangeHandlerFunc func(obj *v1.ServiceAccount) (runtime.Object, error)
@ -75,8 +69,6 @@ type ServiceAccountController interface {
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ServiceAccountHandlerFunc)
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, after time.Duration)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type ServiceAccountInterface interface {
@ -87,8 +79,8 @@ type ServiceAccountInterface interface {
Update(*v1.ServiceAccount) (*v1.ServiceAccount, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*ServiceAccountList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*ServiceAccountList, error)
List(opts metav1.ListOptions) (*v1.ServiceAccountList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ServiceAccountList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() ServiceAccountController
@ -127,7 +119,7 @@ func (l *serviceAccountLister) Get(namespace, name string) (*v1.ServiceAccount,
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: ServiceAccountGroupVersionKind.Group,
Resource: "serviceAccount",
Resource: ServiceAccountGroupVersionResource.Resource,
}, key)
}
return obj.(*v1.ServiceAccount), nil
@ -207,29 +199,16 @@ func (c serviceAccountFactory) Object() runtime.Object {
}
func (c serviceAccountFactory) List() runtime.Object {
return &ServiceAccountList{}
return &v1.ServiceAccountList{}
}
func (s *serviceAccountClient) Controller() ServiceAccountController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.serviceAccountControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(ServiceAccountGroupVersionKind.Kind+"Controller",
s.objectClient)
s.client.controllerFactory.ForResourceKind(ServiceAccountGroupVersionResource, ServiceAccountGroupVersionKind.Kind, true))
c = &serviceAccountController{
return &serviceAccountController{
GenericController: genericController,
}
s.client.serviceAccountControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type serviceAccountClient struct {
@ -263,6 +242,11 @@ func (s *serviceAccountClient) Update(o *v1.ServiceAccount) (*v1.ServiceAccount,
return obj.(*v1.ServiceAccount), err
}
func (s *serviceAccountClient) UpdateStatus(o *v1.ServiceAccount) (*v1.ServiceAccount, error) {
obj, err := s.objectClient.UpdateStatus(o.Name, o)
return obj.(*v1.ServiceAccount), err
}
func (s *serviceAccountClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
@ -271,14 +255,14 @@ func (s *serviceAccountClient) DeleteNamespaced(namespace, name string, options
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *serviceAccountClient) List(opts metav1.ListOptions) (*ServiceAccountList, error) {
func (s *serviceAccountClient) List(opts metav1.ListOptions) (*v1.ServiceAccountList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*ServiceAccountList), err
return obj.(*v1.ServiceAccountList), err
}
func (s *serviceAccountClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*ServiceAccountList, error) {
func (s *serviceAccountClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ServiceAccountList, error) {
obj, err := s.objectClient.ListNamespaced(namespace, opts)
return obj.(*ServiceAccountList), err
return obj.(*v1.ServiceAccountList), err
}
func (s *serviceAccountClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {

View File

@ -50,12 +50,6 @@ func NewService(namespace, name string, obj v1.Service) *v1.Service {
return &obj
}
type ServiceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []v1.Service `json:"items"`
}
type ServiceHandlerFunc func(key string, obj *v1.Service) (runtime.Object, error)
type ServiceChangeHandlerFunc func(obj *v1.Service) (runtime.Object, error)
@ -75,8 +69,6 @@ type ServiceController interface {
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ServiceHandlerFunc)
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, after time.Duration)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type ServiceInterface interface {
@ -87,8 +79,8 @@ type ServiceInterface interface {
Update(*v1.Service) (*v1.Service, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*ServiceList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*ServiceList, error)
List(opts metav1.ListOptions) (*v1.ServiceList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ServiceList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() ServiceController
@ -127,7 +119,7 @@ func (l *serviceLister) Get(namespace, name string) (*v1.Service, error) {
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: ServiceGroupVersionKind.Group,
Resource: "service",
Resource: ServiceGroupVersionResource.Resource,
}, key)
}
return obj.(*v1.Service), nil
@ -207,29 +199,16 @@ func (c serviceFactory) Object() runtime.Object {
}
func (c serviceFactory) List() runtime.Object {
return &ServiceList{}
return &v1.ServiceList{}
}
func (s *serviceClient) Controller() ServiceController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.serviceControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(ServiceGroupVersionKind.Kind+"Controller",
s.objectClient)
s.client.controllerFactory.ForResourceKind(ServiceGroupVersionResource, ServiceGroupVersionKind.Kind, true))
c = &serviceController{
return &serviceController{
GenericController: genericController,
}
s.client.serviceControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type serviceClient struct {
@ -263,6 +242,11 @@ func (s *serviceClient) Update(o *v1.Service) (*v1.Service, error) {
return obj.(*v1.Service), err
}
func (s *serviceClient) UpdateStatus(o *v1.Service) (*v1.Service, error) {
obj, err := s.objectClient.UpdateStatus(o.Name, o)
return obj.(*v1.Service), err
}
func (s *serviceClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
@ -271,14 +255,14 @@ func (s *serviceClient) DeleteNamespaced(namespace, name string, options *metav1
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *serviceClient) List(opts metav1.ListOptions) (*ServiceList, error) {
func (s *serviceClient) List(opts metav1.ListOptions) (*v1.ServiceList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*ServiceList), err
return obj.(*v1.ServiceList), err
}
func (s *serviceClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*ServiceList, error) {
func (s *serviceClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ServiceList, error) {
obj, err := s.objectClient.ListNamespaced(namespace, opts)
return obj.(*ServiceList), err
return obj.(*v1.ServiceList), err
}
func (s *serviceClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {

View File

@ -151,8 +151,6 @@ var (
lockIngressControllerMockGeneric sync.RWMutex
lockIngressControllerMockInformer sync.RWMutex
lockIngressControllerMockLister sync.RWMutex
lockIngressControllerMockStart sync.RWMutex
lockIngressControllerMockSync sync.RWMutex
)
// Ensure, that IngressControllerMock does implement IngressController.
@ -192,12 +190,6 @@ var _ v1beta1a.IngressController = &IngressControllerMock{}
// ListerFunc: func() v1beta1a.IngressLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedIngressController in code that requires IngressController
@ -232,12 +224,6 @@ type IngressControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v1beta1a.IngressLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -309,18 +295,6 @@ type IngressControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -648,72 +622,6 @@ func (mock *IngressControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *IngressControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("IngressControllerMock.StartFunc: method is nil but IngressController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockIngressControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockIngressControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedIngressController.StartCalls())
func (mock *IngressControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockIngressControllerMockStart.RLock()
calls = mock.calls.Start
lockIngressControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *IngressControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("IngressControllerMock.SyncFunc: method is nil but IngressController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockIngressControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockIngressControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedIngressController.SyncCalls())
func (mock *IngressControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockIngressControllerMockSync.RLock()
calls = mock.calls.Sync
lockIngressControllerMockSync.RUnlock()
return calls
}
var (
lockIngressInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockIngressInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
@ -792,10 +700,10 @@ var _ v1beta1a.IngressInterface = &IngressInterfaceMock{}
// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v1beta1.Ingress, error) {
// panic("mock out the GetNamespaced method")
// },
// ListFunc: func(opts v1.ListOptions) (*v1beta1a.IngressList, error) {
// ListFunc: func(opts v1.ListOptions) (*v1beta1.IngressList, error) {
// panic("mock out the List method")
// },
// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v1beta1a.IngressList, error) {
// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v1beta1.IngressList, error) {
// panic("mock out the ListNamespaced method")
// },
// ObjectClientFunc: func() *objectclient.ObjectClient {
@ -860,10 +768,10 @@ type IngressInterfaceMock struct {
GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v1beta1.Ingress, error)
// ListFunc mocks the List method.
ListFunc func(opts v1.ListOptions) (*v1beta1a.IngressList, error)
ListFunc func(opts v1.ListOptions) (*v1beta1.IngressList, error)
// ListNamespacedFunc mocks the ListNamespaced method.
ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v1beta1a.IngressList, error)
ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v1beta1.IngressList, error)
// ObjectClientFunc mocks the ObjectClient method.
ObjectClientFunc func() *objectclient.ObjectClient
@ -1624,7 +1532,7 @@ func (mock *IngressInterfaceMock) GetNamespacedCalls() []struct {
}
// List calls ListFunc.
func (mock *IngressInterfaceMock) List(opts v1.ListOptions) (*v1beta1a.IngressList, error) {
func (mock *IngressInterfaceMock) List(opts v1.ListOptions) (*v1beta1.IngressList, error) {
if mock.ListFunc == nil {
panic("IngressInterfaceMock.ListFunc: method is nil but IngressInterface.List was just called")
}
@ -1655,7 +1563,7 @@ func (mock *IngressInterfaceMock) ListCalls() []struct {
}
// ListNamespaced calls ListNamespacedFunc.
func (mock *IngressInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v1beta1a.IngressList, error) {
func (mock *IngressInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v1beta1.IngressList, error) {
if mock.ListNamespacedFunc == nil {
panic("IngressInterfaceMock.ListNamespacedFunc: method is nil but IngressInterface.ListNamespaced was just called")
}

View File

@ -1,39 +0,0 @@
package v1beta1
import (
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *IngressList) DeepCopyInto(out *IngressList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]extensionsv1beta1.Ingress, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressList.
func (in *IngressList) DeepCopy() *IngressList {
if in == nil {
return nil
}
out := new(IngressList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *IngressList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}

View File

@ -50,12 +50,6 @@ func NewIngress(namespace, name string, obj v1beta1.Ingress) *v1beta1.Ingress {
return &obj
}
type IngressList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []v1beta1.Ingress `json:"items"`
}
type IngressHandlerFunc func(key string, obj *v1beta1.Ingress) (runtime.Object, error)
type IngressChangeHandlerFunc func(obj *v1beta1.Ingress) (runtime.Object, error)
@ -75,8 +69,6 @@ type IngressController interface {
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler IngressHandlerFunc)
Enqueue(namespace, name string)
EnqueueAfter(namespace, name string, after time.Duration)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type IngressInterface interface {
@ -87,8 +79,8 @@ type IngressInterface interface {
Update(*v1beta1.Ingress) (*v1beta1.Ingress, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*IngressList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*IngressList, error)
List(opts metav1.ListOptions) (*v1beta1.IngressList, error)
ListNamespaced(namespace string, opts metav1.ListOptions) (*v1beta1.IngressList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() IngressController
@ -127,7 +119,7 @@ func (l *ingressLister) Get(namespace, name string) (*v1beta1.Ingress, error) {
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: IngressGroupVersionKind.Group,
Resource: "ingress",
Resource: IngressGroupVersionResource.Resource,
}, key)
}
return obj.(*v1beta1.Ingress), nil
@ -207,29 +199,16 @@ func (c ingressFactory) Object() runtime.Object {
}
func (c ingressFactory) List() runtime.Object {
return &IngressList{}
return &v1beta1.IngressList{}
}
func (s *ingressClient) Controller() IngressController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.ingressControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(IngressGroupVersionKind.Kind+"Controller",
s.objectClient)
s.client.controllerFactory.ForResourceKind(IngressGroupVersionResource, IngressGroupVersionKind.Kind, true))
c = &ingressController{
return &ingressController{
GenericController: genericController,
}
s.client.ingressControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type ingressClient struct {
@ -263,6 +242,11 @@ func (s *ingressClient) Update(o *v1beta1.Ingress) (*v1beta1.Ingress, error) {
return obj.(*v1beta1.Ingress), err
}
func (s *ingressClient) UpdateStatus(o *v1beta1.Ingress) (*v1beta1.Ingress, error) {
obj, err := s.objectClient.UpdateStatus(o.Name, o)
return obj.(*v1beta1.Ingress), err
}
func (s *ingressClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
@ -271,14 +255,14 @@ func (s *ingressClient) DeleteNamespaced(namespace, name string, options *metav1
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *ingressClient) List(opts metav1.ListOptions) (*IngressList, error) {
func (s *ingressClient) List(opts metav1.ListOptions) (*v1beta1.IngressList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*IngressList), err
return obj.(*v1beta1.IngressList), err
}
func (s *ingressClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*IngressList, error) {
func (s *ingressClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1beta1.IngressList, error) {
obj, err := s.objectClient.ListNamespaced(namespace, opts)
return obj.(*IngressList), err
return obj.(*v1beta1.IngressList), err
}
func (s *ingressClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {

View File

@ -1,71 +1,34 @@
package v1beta1
import (
"context"
"sync"
"github.com/rancher/norman/controller"
"github.com/rancher/lasso/pkg/client"
"github.com/rancher/lasso/pkg/controller"
"github.com/rancher/norman/objectclient"
"github.com/rancher/norman/objectclient/dynamic"
"github.com/rancher/norman/restwatch"
"k8s.io/client-go/rest"
)
type (
contextKeyType struct{}
contextClientsKeyType struct{}
)
type Interface interface {
RESTClient() rest.Interface
controller.Starter
IngressesGetter
}
type Client struct {
sync.Mutex
restClient rest.Interface
starters []controller.Starter
ingressControllers map[string]IngressController
controllerFactory controller.SharedControllerFactory
clientFactory client.SharedClientFactory
}
func NewForConfig(config rest.Config) (Interface, error) {
if config.NegotiatedSerializer == nil {
config.NegotiatedSerializer = dynamic.NegotiatedSerializer
}
restClient, err := restwatch.UnversionedRESTClientFor(&config)
if err != nil {
return nil, err
}
func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) {
return &Client{
restClient: restClient,
ingressControllers: map[string]IngressController{},
controllerFactory: factory,
clientFactory: factory.SharedCacheFactory().SharedClientFactory(),
}, nil
}
func (c *Client) RESTClient() rest.Interface {
return c.restClient
}
func (c *Client) Sync(ctx context.Context) error {
return controller.Sync(ctx, c.starters...)
}
func (c *Client) Start(ctx context.Context, threadiness int) error {
return controller.Start(ctx, threadiness, c.starters...)
}
type IngressesGetter interface {
Ingresses(namespace string) IngressInterface
}
func (c *Client) Ingresses(namespace string) IngressInterface {
objectClient := objectclient.NewObjectClient(namespace, c.restClient, &IngressResource, IngressGroupVersionKind, ingressFactory{})
sharedClient := c.clientFactory.ForResourceKind(IngressGroupVersionResource, IngressGroupVersionKind.Kind, true)
objectClient := objectclient.NewObjectClient(namespace, sharedClient, &IngressResource, IngressGroupVersionKind, ingressFactory{})
return &ingressClient{
ns: namespace,
client: c,

View File

@ -1,8 +1,6 @@
package v1beta1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
@ -23,19 +21,3 @@ func Kind(kind string) schema.GroupKind {
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
var (
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
AddToScheme = SchemeBuilder.AddToScheme
)
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
// TODO this gets cleaned up when the types are fixed
scheme.AddKnownTypes(SchemeGroupVersion,
&IngressList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}

View File

@ -150,8 +150,6 @@ var (
lockAuthConfigControllerMockGeneric sync.RWMutex
lockAuthConfigControllerMockInformer sync.RWMutex
lockAuthConfigControllerMockLister sync.RWMutex
lockAuthConfigControllerMockStart sync.RWMutex
lockAuthConfigControllerMockSync sync.RWMutex
)
// Ensure, that AuthConfigControllerMock does implement AuthConfigController.
@ -191,12 +189,6 @@ var _ v3.AuthConfigController = &AuthConfigControllerMock{}
// ListerFunc: func() v3.AuthConfigLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedAuthConfigController in code that requires AuthConfigController
@ -231,12 +223,6 @@ type AuthConfigControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.AuthConfigLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type AuthConfigControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *AuthConfigControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *AuthConfigControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("AuthConfigControllerMock.StartFunc: method is nil but AuthConfigController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockAuthConfigControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockAuthConfigControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedAuthConfigController.StartCalls())
func (mock *AuthConfigControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockAuthConfigControllerMockStart.RLock()
calls = mock.calls.Start
lockAuthConfigControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *AuthConfigControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("AuthConfigControllerMock.SyncFunc: method is nil but AuthConfigController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockAuthConfigControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockAuthConfigControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedAuthConfigController.SyncCalls())
func (mock *AuthConfigControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockAuthConfigControllerMockSync.RLock()
calls = mock.calls.Sync
lockAuthConfigControllerMockSync.RUnlock()
return calls
}
var (
lockAuthConfigInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockAuthConfigInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockCatalogControllerMockGeneric sync.RWMutex
lockCatalogControllerMockInformer sync.RWMutex
lockCatalogControllerMockLister sync.RWMutex
lockCatalogControllerMockStart sync.RWMutex
lockCatalogControllerMockSync sync.RWMutex
)
// Ensure, that CatalogControllerMock does implement CatalogController.
@ -191,12 +189,6 @@ var _ v3.CatalogController = &CatalogControllerMock{}
// ListerFunc: func() v3.CatalogLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedCatalogController in code that requires CatalogController
@ -231,12 +223,6 @@ type CatalogControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.CatalogLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type CatalogControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *CatalogControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *CatalogControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("CatalogControllerMock.StartFunc: method is nil but CatalogController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockCatalogControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockCatalogControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedCatalogController.StartCalls())
func (mock *CatalogControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockCatalogControllerMockStart.RLock()
calls = mock.calls.Start
lockCatalogControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *CatalogControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("CatalogControllerMock.SyncFunc: method is nil but CatalogController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockCatalogControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockCatalogControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedCatalogController.SyncCalls())
func (mock *CatalogControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockCatalogControllerMockSync.RLock()
calls = mock.calls.Sync
lockCatalogControllerMockSync.RUnlock()
return calls
}
var (
lockCatalogInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockCatalogInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockCatalogTemplateControllerMockGeneric sync.RWMutex
lockCatalogTemplateControllerMockInformer sync.RWMutex
lockCatalogTemplateControllerMockLister sync.RWMutex
lockCatalogTemplateControllerMockStart sync.RWMutex
lockCatalogTemplateControllerMockSync sync.RWMutex
)
// Ensure, that CatalogTemplateControllerMock does implement CatalogTemplateController.
@ -191,12 +189,6 @@ var _ v3.CatalogTemplateController = &CatalogTemplateControllerMock{}
// ListerFunc: func() v3.CatalogTemplateLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedCatalogTemplateController in code that requires CatalogTemplateController
@ -231,12 +223,6 @@ type CatalogTemplateControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.CatalogTemplateLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type CatalogTemplateControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *CatalogTemplateControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *CatalogTemplateControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("CatalogTemplateControllerMock.StartFunc: method is nil but CatalogTemplateController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockCatalogTemplateControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockCatalogTemplateControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedCatalogTemplateController.StartCalls())
func (mock *CatalogTemplateControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockCatalogTemplateControllerMockStart.RLock()
calls = mock.calls.Start
lockCatalogTemplateControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *CatalogTemplateControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("CatalogTemplateControllerMock.SyncFunc: method is nil but CatalogTemplateController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockCatalogTemplateControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockCatalogTemplateControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedCatalogTemplateController.SyncCalls())
func (mock *CatalogTemplateControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockCatalogTemplateControllerMockSync.RLock()
calls = mock.calls.Sync
lockCatalogTemplateControllerMockSync.RUnlock()
return calls
}
var (
lockCatalogTemplateInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockCatalogTemplateInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockCatalogTemplateVersionControllerMockGeneric sync.RWMutex
lockCatalogTemplateVersionControllerMockInformer sync.RWMutex
lockCatalogTemplateVersionControllerMockLister sync.RWMutex
lockCatalogTemplateVersionControllerMockStart sync.RWMutex
lockCatalogTemplateVersionControllerMockSync sync.RWMutex
)
// Ensure, that CatalogTemplateVersionControllerMock does implement CatalogTemplateVersionController.
@ -191,12 +189,6 @@ var _ v3.CatalogTemplateVersionController = &CatalogTemplateVersionControllerMoc
// ListerFunc: func() v3.CatalogTemplateVersionLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedCatalogTemplateVersionController in code that requires CatalogTemplateVersionController
@ -231,12 +223,6 @@ type CatalogTemplateVersionControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.CatalogTemplateVersionLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type CatalogTemplateVersionControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *CatalogTemplateVersionControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *CatalogTemplateVersionControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("CatalogTemplateVersionControllerMock.StartFunc: method is nil but CatalogTemplateVersionController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockCatalogTemplateVersionControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockCatalogTemplateVersionControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedCatalogTemplateVersionController.StartCalls())
func (mock *CatalogTemplateVersionControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockCatalogTemplateVersionControllerMockStart.RLock()
calls = mock.calls.Start
lockCatalogTemplateVersionControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *CatalogTemplateVersionControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("CatalogTemplateVersionControllerMock.SyncFunc: method is nil but CatalogTemplateVersionController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockCatalogTemplateVersionControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockCatalogTemplateVersionControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedCatalogTemplateVersionController.SyncCalls())
func (mock *CatalogTemplateVersionControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockCatalogTemplateVersionControllerMockSync.RLock()
calls = mock.calls.Sync
lockCatalogTemplateVersionControllerMockSync.RUnlock()
return calls
}
var (
lockCatalogTemplateVersionInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockCatalogTemplateVersionInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockCisBenchmarkVersionControllerMockGeneric sync.RWMutex
lockCisBenchmarkVersionControllerMockInformer sync.RWMutex
lockCisBenchmarkVersionControllerMockLister sync.RWMutex
lockCisBenchmarkVersionControllerMockStart sync.RWMutex
lockCisBenchmarkVersionControllerMockSync sync.RWMutex
)
// Ensure, that CisBenchmarkVersionControllerMock does implement CisBenchmarkVersionController.
@ -191,12 +189,6 @@ var _ v3.CisBenchmarkVersionController = &CisBenchmarkVersionControllerMock{}
// ListerFunc: func() v3.CisBenchmarkVersionLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedCisBenchmarkVersionController in code that requires CisBenchmarkVersionController
@ -231,12 +223,6 @@ type CisBenchmarkVersionControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.CisBenchmarkVersionLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type CisBenchmarkVersionControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *CisBenchmarkVersionControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *CisBenchmarkVersionControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("CisBenchmarkVersionControllerMock.StartFunc: method is nil but CisBenchmarkVersionController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockCisBenchmarkVersionControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockCisBenchmarkVersionControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedCisBenchmarkVersionController.StartCalls())
func (mock *CisBenchmarkVersionControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockCisBenchmarkVersionControllerMockStart.RLock()
calls = mock.calls.Start
lockCisBenchmarkVersionControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *CisBenchmarkVersionControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("CisBenchmarkVersionControllerMock.SyncFunc: method is nil but CisBenchmarkVersionController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockCisBenchmarkVersionControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockCisBenchmarkVersionControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedCisBenchmarkVersionController.SyncCalls())
func (mock *CisBenchmarkVersionControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockCisBenchmarkVersionControllerMockSync.RLock()
calls = mock.calls.Sync
lockCisBenchmarkVersionControllerMockSync.RUnlock()
return calls
}
var (
lockCisBenchmarkVersionInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockCisBenchmarkVersionInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockCisConfigControllerMockGeneric sync.RWMutex
lockCisConfigControllerMockInformer sync.RWMutex
lockCisConfigControllerMockLister sync.RWMutex
lockCisConfigControllerMockStart sync.RWMutex
lockCisConfigControllerMockSync sync.RWMutex
)
// Ensure, that CisConfigControllerMock does implement CisConfigController.
@ -191,12 +189,6 @@ var _ v3.CisConfigController = &CisConfigControllerMock{}
// ListerFunc: func() v3.CisConfigLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedCisConfigController in code that requires CisConfigController
@ -231,12 +223,6 @@ type CisConfigControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.CisConfigLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type CisConfigControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *CisConfigControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *CisConfigControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("CisConfigControllerMock.StartFunc: method is nil but CisConfigController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockCisConfigControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockCisConfigControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedCisConfigController.StartCalls())
func (mock *CisConfigControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockCisConfigControllerMockStart.RLock()
calls = mock.calls.Start
lockCisConfigControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *CisConfigControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("CisConfigControllerMock.SyncFunc: method is nil but CisConfigController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockCisConfigControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockCisConfigControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedCisConfigController.SyncCalls())
func (mock *CisConfigControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockCisConfigControllerMockSync.RLock()
calls = mock.calls.Sync
lockCisConfigControllerMockSync.RUnlock()
return calls
}
var (
lockCisConfigInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockCisConfigInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockCloudCredentialControllerMockGeneric sync.RWMutex
lockCloudCredentialControllerMockInformer sync.RWMutex
lockCloudCredentialControllerMockLister sync.RWMutex
lockCloudCredentialControllerMockStart sync.RWMutex
lockCloudCredentialControllerMockSync sync.RWMutex
)
// Ensure, that CloudCredentialControllerMock does implement CloudCredentialController.
@ -191,12 +189,6 @@ var _ v3.CloudCredentialController = &CloudCredentialControllerMock{}
// ListerFunc: func() v3.CloudCredentialLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedCloudCredentialController in code that requires CloudCredentialController
@ -231,12 +223,6 @@ type CloudCredentialControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.CloudCredentialLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type CloudCredentialControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *CloudCredentialControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *CloudCredentialControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("CloudCredentialControllerMock.StartFunc: method is nil but CloudCredentialController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockCloudCredentialControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockCloudCredentialControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedCloudCredentialController.StartCalls())
func (mock *CloudCredentialControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockCloudCredentialControllerMockStart.RLock()
calls = mock.calls.Start
lockCloudCredentialControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *CloudCredentialControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("CloudCredentialControllerMock.SyncFunc: method is nil but CloudCredentialController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockCloudCredentialControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockCloudCredentialControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedCloudCredentialController.SyncCalls())
func (mock *CloudCredentialControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockCloudCredentialControllerMockSync.RLock()
calls = mock.calls.Sync
lockCloudCredentialControllerMockSync.RUnlock()
return calls
}
var (
lockCloudCredentialInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockCloudCredentialInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockClusterAlertGroupControllerMockGeneric sync.RWMutex
lockClusterAlertGroupControllerMockInformer sync.RWMutex
lockClusterAlertGroupControllerMockLister sync.RWMutex
lockClusterAlertGroupControllerMockStart sync.RWMutex
lockClusterAlertGroupControllerMockSync sync.RWMutex
)
// Ensure, that ClusterAlertGroupControllerMock does implement ClusterAlertGroupController.
@ -191,12 +189,6 @@ var _ v3.ClusterAlertGroupController = &ClusterAlertGroupControllerMock{}
// ListerFunc: func() v3.ClusterAlertGroupLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedClusterAlertGroupController in code that requires ClusterAlertGroupController
@ -231,12 +223,6 @@ type ClusterAlertGroupControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.ClusterAlertGroupLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type ClusterAlertGroupControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *ClusterAlertGroupControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *ClusterAlertGroupControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("ClusterAlertGroupControllerMock.StartFunc: method is nil but ClusterAlertGroupController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockClusterAlertGroupControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockClusterAlertGroupControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedClusterAlertGroupController.StartCalls())
func (mock *ClusterAlertGroupControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockClusterAlertGroupControllerMockStart.RLock()
calls = mock.calls.Start
lockClusterAlertGroupControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *ClusterAlertGroupControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("ClusterAlertGroupControllerMock.SyncFunc: method is nil but ClusterAlertGroupController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockClusterAlertGroupControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockClusterAlertGroupControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedClusterAlertGroupController.SyncCalls())
func (mock *ClusterAlertGroupControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockClusterAlertGroupControllerMockSync.RLock()
calls = mock.calls.Sync
lockClusterAlertGroupControllerMockSync.RUnlock()
return calls
}
var (
lockClusterAlertGroupInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockClusterAlertGroupInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockClusterAlertControllerMockGeneric sync.RWMutex
lockClusterAlertControllerMockInformer sync.RWMutex
lockClusterAlertControllerMockLister sync.RWMutex
lockClusterAlertControllerMockStart sync.RWMutex
lockClusterAlertControllerMockSync sync.RWMutex
)
// Ensure, that ClusterAlertControllerMock does implement ClusterAlertController.
@ -191,12 +189,6 @@ var _ v3.ClusterAlertController = &ClusterAlertControllerMock{}
// ListerFunc: func() v3.ClusterAlertLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedClusterAlertController in code that requires ClusterAlertController
@ -231,12 +223,6 @@ type ClusterAlertControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.ClusterAlertLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type ClusterAlertControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *ClusterAlertControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *ClusterAlertControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("ClusterAlertControllerMock.StartFunc: method is nil but ClusterAlertController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockClusterAlertControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockClusterAlertControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedClusterAlertController.StartCalls())
func (mock *ClusterAlertControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockClusterAlertControllerMockStart.RLock()
calls = mock.calls.Start
lockClusterAlertControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *ClusterAlertControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("ClusterAlertControllerMock.SyncFunc: method is nil but ClusterAlertController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockClusterAlertControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockClusterAlertControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedClusterAlertController.SyncCalls())
func (mock *ClusterAlertControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockClusterAlertControllerMockSync.RLock()
calls = mock.calls.Sync
lockClusterAlertControllerMockSync.RUnlock()
return calls
}
var (
lockClusterAlertInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockClusterAlertInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockClusterAlertRuleControllerMockGeneric sync.RWMutex
lockClusterAlertRuleControllerMockInformer sync.RWMutex
lockClusterAlertRuleControllerMockLister sync.RWMutex
lockClusterAlertRuleControllerMockStart sync.RWMutex
lockClusterAlertRuleControllerMockSync sync.RWMutex
)
// Ensure, that ClusterAlertRuleControllerMock does implement ClusterAlertRuleController.
@ -191,12 +189,6 @@ var _ v3.ClusterAlertRuleController = &ClusterAlertRuleControllerMock{}
// ListerFunc: func() v3.ClusterAlertRuleLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedClusterAlertRuleController in code that requires ClusterAlertRuleController
@ -231,12 +223,6 @@ type ClusterAlertRuleControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.ClusterAlertRuleLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type ClusterAlertRuleControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *ClusterAlertRuleControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *ClusterAlertRuleControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("ClusterAlertRuleControllerMock.StartFunc: method is nil but ClusterAlertRuleController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockClusterAlertRuleControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockClusterAlertRuleControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedClusterAlertRuleController.StartCalls())
func (mock *ClusterAlertRuleControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockClusterAlertRuleControllerMockStart.RLock()
calls = mock.calls.Start
lockClusterAlertRuleControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *ClusterAlertRuleControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("ClusterAlertRuleControllerMock.SyncFunc: method is nil but ClusterAlertRuleController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockClusterAlertRuleControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockClusterAlertRuleControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedClusterAlertRuleController.SyncCalls())
func (mock *ClusterAlertRuleControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockClusterAlertRuleControllerMockSync.RLock()
calls = mock.calls.Sync
lockClusterAlertRuleControllerMockSync.RUnlock()
return calls
}
var (
lockClusterAlertRuleInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockClusterAlertRuleInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockClusterCatalogControllerMockGeneric sync.RWMutex
lockClusterCatalogControllerMockInformer sync.RWMutex
lockClusterCatalogControllerMockLister sync.RWMutex
lockClusterCatalogControllerMockStart sync.RWMutex
lockClusterCatalogControllerMockSync sync.RWMutex
)
// Ensure, that ClusterCatalogControllerMock does implement ClusterCatalogController.
@ -191,12 +189,6 @@ var _ v3.ClusterCatalogController = &ClusterCatalogControllerMock{}
// ListerFunc: func() v3.ClusterCatalogLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedClusterCatalogController in code that requires ClusterCatalogController
@ -231,12 +223,6 @@ type ClusterCatalogControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.ClusterCatalogLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type ClusterCatalogControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *ClusterCatalogControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *ClusterCatalogControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("ClusterCatalogControllerMock.StartFunc: method is nil but ClusterCatalogController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockClusterCatalogControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockClusterCatalogControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedClusterCatalogController.StartCalls())
func (mock *ClusterCatalogControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockClusterCatalogControllerMockStart.RLock()
calls = mock.calls.Start
lockClusterCatalogControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *ClusterCatalogControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("ClusterCatalogControllerMock.SyncFunc: method is nil but ClusterCatalogController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockClusterCatalogControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockClusterCatalogControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedClusterCatalogController.SyncCalls())
func (mock *ClusterCatalogControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockClusterCatalogControllerMockSync.RLock()
calls = mock.calls.Sync
lockClusterCatalogControllerMockSync.RUnlock()
return calls
}
var (
lockClusterCatalogInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockClusterCatalogInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockClusterLoggingControllerMockGeneric sync.RWMutex
lockClusterLoggingControllerMockInformer sync.RWMutex
lockClusterLoggingControllerMockLister sync.RWMutex
lockClusterLoggingControllerMockStart sync.RWMutex
lockClusterLoggingControllerMockSync sync.RWMutex
)
// Ensure, that ClusterLoggingControllerMock does implement ClusterLoggingController.
@ -191,12 +189,6 @@ var _ v3.ClusterLoggingController = &ClusterLoggingControllerMock{}
// ListerFunc: func() v3.ClusterLoggingLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedClusterLoggingController in code that requires ClusterLoggingController
@ -231,12 +223,6 @@ type ClusterLoggingControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.ClusterLoggingLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type ClusterLoggingControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *ClusterLoggingControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *ClusterLoggingControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("ClusterLoggingControllerMock.StartFunc: method is nil but ClusterLoggingController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockClusterLoggingControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockClusterLoggingControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedClusterLoggingController.StartCalls())
func (mock *ClusterLoggingControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockClusterLoggingControllerMockStart.RLock()
calls = mock.calls.Start
lockClusterLoggingControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *ClusterLoggingControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("ClusterLoggingControllerMock.SyncFunc: method is nil but ClusterLoggingController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockClusterLoggingControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockClusterLoggingControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedClusterLoggingController.SyncCalls())
func (mock *ClusterLoggingControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockClusterLoggingControllerMockSync.RLock()
calls = mock.calls.Sync
lockClusterLoggingControllerMockSync.RUnlock()
return calls
}
var (
lockClusterLoggingInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockClusterLoggingInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockClusterControllerMockGeneric sync.RWMutex
lockClusterControllerMockInformer sync.RWMutex
lockClusterControllerMockLister sync.RWMutex
lockClusterControllerMockStart sync.RWMutex
lockClusterControllerMockSync sync.RWMutex
)
// Ensure, that ClusterControllerMock does implement ClusterController.
@ -191,12 +189,6 @@ var _ v3.ClusterController = &ClusterControllerMock{}
// ListerFunc: func() v3.ClusterLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedClusterController in code that requires ClusterController
@ -231,12 +223,6 @@ type ClusterControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.ClusterLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type ClusterControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *ClusterControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *ClusterControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("ClusterControllerMock.StartFunc: method is nil but ClusterController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockClusterControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockClusterControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedClusterController.StartCalls())
func (mock *ClusterControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockClusterControllerMockStart.RLock()
calls = mock.calls.Start
lockClusterControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *ClusterControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("ClusterControllerMock.SyncFunc: method is nil but ClusterController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockClusterControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockClusterControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedClusterController.SyncCalls())
func (mock *ClusterControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockClusterControllerMockSync.RLock()
calls = mock.calls.Sync
lockClusterControllerMockSync.RUnlock()
return calls
}
var (
lockClusterInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockClusterInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockClusterMonitorGraphControllerMockGeneric sync.RWMutex
lockClusterMonitorGraphControllerMockInformer sync.RWMutex
lockClusterMonitorGraphControllerMockLister sync.RWMutex
lockClusterMonitorGraphControllerMockStart sync.RWMutex
lockClusterMonitorGraphControllerMockSync sync.RWMutex
)
// Ensure, that ClusterMonitorGraphControllerMock does implement ClusterMonitorGraphController.
@ -191,12 +189,6 @@ var _ v3.ClusterMonitorGraphController = &ClusterMonitorGraphControllerMock{}
// ListerFunc: func() v3.ClusterMonitorGraphLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedClusterMonitorGraphController in code that requires ClusterMonitorGraphController
@ -231,12 +223,6 @@ type ClusterMonitorGraphControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.ClusterMonitorGraphLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type ClusterMonitorGraphControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *ClusterMonitorGraphControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *ClusterMonitorGraphControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("ClusterMonitorGraphControllerMock.StartFunc: method is nil but ClusterMonitorGraphController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockClusterMonitorGraphControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockClusterMonitorGraphControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedClusterMonitorGraphController.StartCalls())
func (mock *ClusterMonitorGraphControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockClusterMonitorGraphControllerMockStart.RLock()
calls = mock.calls.Start
lockClusterMonitorGraphControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *ClusterMonitorGraphControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("ClusterMonitorGraphControllerMock.SyncFunc: method is nil but ClusterMonitorGraphController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockClusterMonitorGraphControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockClusterMonitorGraphControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedClusterMonitorGraphController.SyncCalls())
func (mock *ClusterMonitorGraphControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockClusterMonitorGraphControllerMockSync.RLock()
calls = mock.calls.Sync
lockClusterMonitorGraphControllerMockSync.RUnlock()
return calls
}
var (
lockClusterMonitorGraphInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockClusterMonitorGraphInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockClusterRegistrationTokenControllerMockGeneric sync.RWMutex
lockClusterRegistrationTokenControllerMockInformer sync.RWMutex
lockClusterRegistrationTokenControllerMockLister sync.RWMutex
lockClusterRegistrationTokenControllerMockStart sync.RWMutex
lockClusterRegistrationTokenControllerMockSync sync.RWMutex
)
// Ensure, that ClusterRegistrationTokenControllerMock does implement ClusterRegistrationTokenController.
@ -191,12 +189,6 @@ var _ v3.ClusterRegistrationTokenController = &ClusterRegistrationTokenControlle
// ListerFunc: func() v3.ClusterRegistrationTokenLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedClusterRegistrationTokenController in code that requires ClusterRegistrationTokenController
@ -231,12 +223,6 @@ type ClusterRegistrationTokenControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.ClusterRegistrationTokenLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type ClusterRegistrationTokenControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *ClusterRegistrationTokenControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *ClusterRegistrationTokenControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("ClusterRegistrationTokenControllerMock.StartFunc: method is nil but ClusterRegistrationTokenController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockClusterRegistrationTokenControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockClusterRegistrationTokenControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedClusterRegistrationTokenController.StartCalls())
func (mock *ClusterRegistrationTokenControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockClusterRegistrationTokenControllerMockStart.RLock()
calls = mock.calls.Start
lockClusterRegistrationTokenControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *ClusterRegistrationTokenControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("ClusterRegistrationTokenControllerMock.SyncFunc: method is nil but ClusterRegistrationTokenController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockClusterRegistrationTokenControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockClusterRegistrationTokenControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedClusterRegistrationTokenController.SyncCalls())
func (mock *ClusterRegistrationTokenControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockClusterRegistrationTokenControllerMockSync.RLock()
calls = mock.calls.Sync
lockClusterRegistrationTokenControllerMockSync.RUnlock()
return calls
}
var (
lockClusterRegistrationTokenInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockClusterRegistrationTokenInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockClusterRoleTemplateBindingControllerMockGeneric sync.RWMutex
lockClusterRoleTemplateBindingControllerMockInformer sync.RWMutex
lockClusterRoleTemplateBindingControllerMockLister sync.RWMutex
lockClusterRoleTemplateBindingControllerMockStart sync.RWMutex
lockClusterRoleTemplateBindingControllerMockSync sync.RWMutex
)
// Ensure, that ClusterRoleTemplateBindingControllerMock does implement ClusterRoleTemplateBindingController.
@ -191,12 +189,6 @@ var _ v3.ClusterRoleTemplateBindingController = &ClusterRoleTemplateBindingContr
// ListerFunc: func() v3.ClusterRoleTemplateBindingLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedClusterRoleTemplateBindingController in code that requires ClusterRoleTemplateBindingController
@ -231,12 +223,6 @@ type ClusterRoleTemplateBindingControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.ClusterRoleTemplateBindingLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type ClusterRoleTemplateBindingControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *ClusterRoleTemplateBindingControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *ClusterRoleTemplateBindingControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("ClusterRoleTemplateBindingControllerMock.StartFunc: method is nil but ClusterRoleTemplateBindingController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockClusterRoleTemplateBindingControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockClusterRoleTemplateBindingControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedClusterRoleTemplateBindingController.StartCalls())
func (mock *ClusterRoleTemplateBindingControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockClusterRoleTemplateBindingControllerMockStart.RLock()
calls = mock.calls.Start
lockClusterRoleTemplateBindingControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *ClusterRoleTemplateBindingControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("ClusterRoleTemplateBindingControllerMock.SyncFunc: method is nil but ClusterRoleTemplateBindingController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockClusterRoleTemplateBindingControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockClusterRoleTemplateBindingControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedClusterRoleTemplateBindingController.SyncCalls())
func (mock *ClusterRoleTemplateBindingControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockClusterRoleTemplateBindingControllerMockSync.RLock()
calls = mock.calls.Sync
lockClusterRoleTemplateBindingControllerMockSync.RUnlock()
return calls
}
var (
lockClusterRoleTemplateBindingInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockClusterRoleTemplateBindingInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockClusterScanControllerMockGeneric sync.RWMutex
lockClusterScanControllerMockInformer sync.RWMutex
lockClusterScanControllerMockLister sync.RWMutex
lockClusterScanControllerMockStart sync.RWMutex
lockClusterScanControllerMockSync sync.RWMutex
)
// Ensure, that ClusterScanControllerMock does implement ClusterScanController.
@ -191,12 +189,6 @@ var _ v3.ClusterScanController = &ClusterScanControllerMock{}
// ListerFunc: func() v3.ClusterScanLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedClusterScanController in code that requires ClusterScanController
@ -231,12 +223,6 @@ type ClusterScanControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.ClusterScanLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type ClusterScanControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *ClusterScanControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *ClusterScanControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("ClusterScanControllerMock.StartFunc: method is nil but ClusterScanController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockClusterScanControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockClusterScanControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedClusterScanController.StartCalls())
func (mock *ClusterScanControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockClusterScanControllerMockStart.RLock()
calls = mock.calls.Start
lockClusterScanControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *ClusterScanControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("ClusterScanControllerMock.SyncFunc: method is nil but ClusterScanController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockClusterScanControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockClusterScanControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedClusterScanController.SyncCalls())
func (mock *ClusterScanControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockClusterScanControllerMockSync.RLock()
calls = mock.calls.Sync
lockClusterScanControllerMockSync.RUnlock()
return calls
}
var (
lockClusterScanInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockClusterScanInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockClusterTemplateControllerMockGeneric sync.RWMutex
lockClusterTemplateControllerMockInformer sync.RWMutex
lockClusterTemplateControllerMockLister sync.RWMutex
lockClusterTemplateControllerMockStart sync.RWMutex
lockClusterTemplateControllerMockSync sync.RWMutex
)
// Ensure, that ClusterTemplateControllerMock does implement ClusterTemplateController.
@ -191,12 +189,6 @@ var _ v3.ClusterTemplateController = &ClusterTemplateControllerMock{}
// ListerFunc: func() v3.ClusterTemplateLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedClusterTemplateController in code that requires ClusterTemplateController
@ -231,12 +223,6 @@ type ClusterTemplateControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.ClusterTemplateLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type ClusterTemplateControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *ClusterTemplateControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *ClusterTemplateControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("ClusterTemplateControllerMock.StartFunc: method is nil but ClusterTemplateController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockClusterTemplateControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockClusterTemplateControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedClusterTemplateController.StartCalls())
func (mock *ClusterTemplateControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockClusterTemplateControllerMockStart.RLock()
calls = mock.calls.Start
lockClusterTemplateControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *ClusterTemplateControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("ClusterTemplateControllerMock.SyncFunc: method is nil but ClusterTemplateController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockClusterTemplateControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockClusterTemplateControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedClusterTemplateController.SyncCalls())
func (mock *ClusterTemplateControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockClusterTemplateControllerMockSync.RLock()
calls = mock.calls.Sync
lockClusterTemplateControllerMockSync.RUnlock()
return calls
}
var (
lockClusterTemplateInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockClusterTemplateInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockClusterTemplateRevisionControllerMockGeneric sync.RWMutex
lockClusterTemplateRevisionControllerMockInformer sync.RWMutex
lockClusterTemplateRevisionControllerMockLister sync.RWMutex
lockClusterTemplateRevisionControllerMockStart sync.RWMutex
lockClusterTemplateRevisionControllerMockSync sync.RWMutex
)
// Ensure, that ClusterTemplateRevisionControllerMock does implement ClusterTemplateRevisionController.
@ -191,12 +189,6 @@ var _ v3.ClusterTemplateRevisionController = &ClusterTemplateRevisionControllerM
// ListerFunc: func() v3.ClusterTemplateRevisionLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedClusterTemplateRevisionController in code that requires ClusterTemplateRevisionController
@ -231,12 +223,6 @@ type ClusterTemplateRevisionControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.ClusterTemplateRevisionLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type ClusterTemplateRevisionControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *ClusterTemplateRevisionControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *ClusterTemplateRevisionControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("ClusterTemplateRevisionControllerMock.StartFunc: method is nil but ClusterTemplateRevisionController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockClusterTemplateRevisionControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockClusterTemplateRevisionControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedClusterTemplateRevisionController.StartCalls())
func (mock *ClusterTemplateRevisionControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockClusterTemplateRevisionControllerMockStart.RLock()
calls = mock.calls.Start
lockClusterTemplateRevisionControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *ClusterTemplateRevisionControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("ClusterTemplateRevisionControllerMock.SyncFunc: method is nil but ClusterTemplateRevisionController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockClusterTemplateRevisionControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockClusterTemplateRevisionControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedClusterTemplateRevisionController.SyncCalls())
func (mock *ClusterTemplateRevisionControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockClusterTemplateRevisionControllerMockSync.RLock()
calls = mock.calls.Sync
lockClusterTemplateRevisionControllerMockSync.RUnlock()
return calls
}
var (
lockClusterTemplateRevisionInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockClusterTemplateRevisionInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockComposeConfigControllerMockGeneric sync.RWMutex
lockComposeConfigControllerMockInformer sync.RWMutex
lockComposeConfigControllerMockLister sync.RWMutex
lockComposeConfigControllerMockStart sync.RWMutex
lockComposeConfigControllerMockSync sync.RWMutex
)
// Ensure, that ComposeConfigControllerMock does implement ComposeConfigController.
@ -191,12 +189,6 @@ var _ v3.ComposeConfigController = &ComposeConfigControllerMock{}
// ListerFunc: func() v3.ComposeConfigLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedComposeConfigController in code that requires ComposeConfigController
@ -231,12 +223,6 @@ type ComposeConfigControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.ComposeConfigLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type ComposeConfigControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *ComposeConfigControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *ComposeConfigControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("ComposeConfigControllerMock.StartFunc: method is nil but ComposeConfigController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockComposeConfigControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockComposeConfigControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedComposeConfigController.StartCalls())
func (mock *ComposeConfigControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockComposeConfigControllerMockStart.RLock()
calls = mock.calls.Start
lockComposeConfigControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *ComposeConfigControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("ComposeConfigControllerMock.SyncFunc: method is nil but ComposeConfigController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockComposeConfigControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockComposeConfigControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedComposeConfigController.SyncCalls())
func (mock *ComposeConfigControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockComposeConfigControllerMockSync.RLock()
calls = mock.calls.Sync
lockComposeConfigControllerMockSync.RUnlock()
return calls
}
var (
lockComposeConfigInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockComposeConfigInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockDynamicSchemaControllerMockGeneric sync.RWMutex
lockDynamicSchemaControllerMockInformer sync.RWMutex
lockDynamicSchemaControllerMockLister sync.RWMutex
lockDynamicSchemaControllerMockStart sync.RWMutex
lockDynamicSchemaControllerMockSync sync.RWMutex
)
// Ensure, that DynamicSchemaControllerMock does implement DynamicSchemaController.
@ -191,12 +189,6 @@ var _ v3.DynamicSchemaController = &DynamicSchemaControllerMock{}
// ListerFunc: func() v3.DynamicSchemaLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedDynamicSchemaController in code that requires DynamicSchemaController
@ -231,12 +223,6 @@ type DynamicSchemaControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.DynamicSchemaLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type DynamicSchemaControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *DynamicSchemaControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *DynamicSchemaControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("DynamicSchemaControllerMock.StartFunc: method is nil but DynamicSchemaController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockDynamicSchemaControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockDynamicSchemaControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedDynamicSchemaController.StartCalls())
func (mock *DynamicSchemaControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockDynamicSchemaControllerMockStart.RLock()
calls = mock.calls.Start
lockDynamicSchemaControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *DynamicSchemaControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("DynamicSchemaControllerMock.SyncFunc: method is nil but DynamicSchemaController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockDynamicSchemaControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockDynamicSchemaControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedDynamicSchemaController.SyncCalls())
func (mock *DynamicSchemaControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockDynamicSchemaControllerMockSync.RLock()
calls = mock.calls.Sync
lockDynamicSchemaControllerMockSync.RUnlock()
return calls
}
var (
lockDynamicSchemaInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockDynamicSchemaInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockEtcdBackupControllerMockGeneric sync.RWMutex
lockEtcdBackupControllerMockInformer sync.RWMutex
lockEtcdBackupControllerMockLister sync.RWMutex
lockEtcdBackupControllerMockStart sync.RWMutex
lockEtcdBackupControllerMockSync sync.RWMutex
)
// Ensure, that EtcdBackupControllerMock does implement EtcdBackupController.
@ -191,12 +189,6 @@ var _ v3.EtcdBackupController = &EtcdBackupControllerMock{}
// ListerFunc: func() v3.EtcdBackupLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedEtcdBackupController in code that requires EtcdBackupController
@ -231,12 +223,6 @@ type EtcdBackupControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.EtcdBackupLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type EtcdBackupControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *EtcdBackupControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *EtcdBackupControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("EtcdBackupControllerMock.StartFunc: method is nil but EtcdBackupController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockEtcdBackupControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockEtcdBackupControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedEtcdBackupController.StartCalls())
func (mock *EtcdBackupControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockEtcdBackupControllerMockStart.RLock()
calls = mock.calls.Start
lockEtcdBackupControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *EtcdBackupControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("EtcdBackupControllerMock.SyncFunc: method is nil but EtcdBackupController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockEtcdBackupControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockEtcdBackupControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedEtcdBackupController.SyncCalls())
func (mock *EtcdBackupControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockEtcdBackupControllerMockSync.RLock()
calls = mock.calls.Sync
lockEtcdBackupControllerMockSync.RUnlock()
return calls
}
var (
lockEtcdBackupInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockEtcdBackupInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockFeatureControllerMockGeneric sync.RWMutex
lockFeatureControllerMockInformer sync.RWMutex
lockFeatureControllerMockLister sync.RWMutex
lockFeatureControllerMockStart sync.RWMutex
lockFeatureControllerMockSync sync.RWMutex
)
// Ensure, that FeatureControllerMock does implement FeatureController.
@ -191,12 +189,6 @@ var _ v3.FeatureController = &FeatureControllerMock{}
// ListerFunc: func() v3.FeatureLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedFeatureController in code that requires FeatureController
@ -231,12 +223,6 @@ type FeatureControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.FeatureLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type FeatureControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *FeatureControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *FeatureControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("FeatureControllerMock.StartFunc: method is nil but FeatureController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockFeatureControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockFeatureControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedFeatureController.StartCalls())
func (mock *FeatureControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockFeatureControllerMockStart.RLock()
calls = mock.calls.Start
lockFeatureControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *FeatureControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("FeatureControllerMock.SyncFunc: method is nil but FeatureController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockFeatureControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockFeatureControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedFeatureController.SyncCalls())
func (mock *FeatureControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockFeatureControllerMockSync.RLock()
calls = mock.calls.Sync
lockFeatureControllerMockSync.RUnlock()
return calls
}
var (
lockFeatureInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockFeatureInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockGlobalDNSProviderControllerMockGeneric sync.RWMutex
lockGlobalDNSProviderControllerMockInformer sync.RWMutex
lockGlobalDNSProviderControllerMockLister sync.RWMutex
lockGlobalDNSProviderControllerMockStart sync.RWMutex
lockGlobalDNSProviderControllerMockSync sync.RWMutex
)
// Ensure, that GlobalDNSProviderControllerMock does implement GlobalDNSProviderController.
@ -191,12 +189,6 @@ var _ v3.GlobalDNSProviderController = &GlobalDNSProviderControllerMock{}
// ListerFunc: func() v3.GlobalDNSProviderLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedGlobalDNSProviderController in code that requires GlobalDNSProviderController
@ -231,12 +223,6 @@ type GlobalDNSProviderControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.GlobalDNSProviderLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type GlobalDNSProviderControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *GlobalDNSProviderControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *GlobalDNSProviderControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("GlobalDNSProviderControllerMock.StartFunc: method is nil but GlobalDNSProviderController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockGlobalDNSProviderControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockGlobalDNSProviderControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedGlobalDNSProviderController.StartCalls())
func (mock *GlobalDNSProviderControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockGlobalDNSProviderControllerMockStart.RLock()
calls = mock.calls.Start
lockGlobalDNSProviderControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *GlobalDNSProviderControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("GlobalDNSProviderControllerMock.SyncFunc: method is nil but GlobalDNSProviderController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockGlobalDNSProviderControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockGlobalDNSProviderControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedGlobalDNSProviderController.SyncCalls())
func (mock *GlobalDNSProviderControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockGlobalDNSProviderControllerMockSync.RLock()
calls = mock.calls.Sync
lockGlobalDNSProviderControllerMockSync.RUnlock()
return calls
}
var (
lockGlobalDNSProviderInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockGlobalDNSProviderInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockGlobalRoleBindingControllerMockGeneric sync.RWMutex
lockGlobalRoleBindingControllerMockInformer sync.RWMutex
lockGlobalRoleBindingControllerMockLister sync.RWMutex
lockGlobalRoleBindingControllerMockStart sync.RWMutex
lockGlobalRoleBindingControllerMockSync sync.RWMutex
)
// Ensure, that GlobalRoleBindingControllerMock does implement GlobalRoleBindingController.
@ -191,12 +189,6 @@ var _ v3.GlobalRoleBindingController = &GlobalRoleBindingControllerMock{}
// ListerFunc: func() v3.GlobalRoleBindingLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedGlobalRoleBindingController in code that requires GlobalRoleBindingController
@ -231,12 +223,6 @@ type GlobalRoleBindingControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.GlobalRoleBindingLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type GlobalRoleBindingControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *GlobalRoleBindingControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *GlobalRoleBindingControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("GlobalRoleBindingControllerMock.StartFunc: method is nil but GlobalRoleBindingController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockGlobalRoleBindingControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockGlobalRoleBindingControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedGlobalRoleBindingController.StartCalls())
func (mock *GlobalRoleBindingControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockGlobalRoleBindingControllerMockStart.RLock()
calls = mock.calls.Start
lockGlobalRoleBindingControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *GlobalRoleBindingControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("GlobalRoleBindingControllerMock.SyncFunc: method is nil but GlobalRoleBindingController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockGlobalRoleBindingControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockGlobalRoleBindingControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedGlobalRoleBindingController.SyncCalls())
func (mock *GlobalRoleBindingControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockGlobalRoleBindingControllerMockSync.RLock()
calls = mock.calls.Sync
lockGlobalRoleBindingControllerMockSync.RUnlock()
return calls
}
var (
lockGlobalRoleBindingInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockGlobalRoleBindingInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

View File

@ -150,8 +150,6 @@ var (
lockGlobalRoleControllerMockGeneric sync.RWMutex
lockGlobalRoleControllerMockInformer sync.RWMutex
lockGlobalRoleControllerMockLister sync.RWMutex
lockGlobalRoleControllerMockStart sync.RWMutex
lockGlobalRoleControllerMockSync sync.RWMutex
)
// Ensure, that GlobalRoleControllerMock does implement GlobalRoleController.
@ -191,12 +189,6 @@ var _ v3.GlobalRoleController = &GlobalRoleControllerMock{}
// ListerFunc: func() v3.GlobalRoleLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedGlobalRoleController in code that requires GlobalRoleController
@ -231,12 +223,6 @@ type GlobalRoleControllerMock struct {
// ListerFunc mocks the Lister method.
ListerFunc func() v3.GlobalRoleLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
@ -308,18 +294,6 @@ type GlobalRoleControllerMock struct {
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
@ -647,72 +621,6 @@ func (mock *GlobalRoleControllerMock) ListerCalls() []struct {
return calls
}
// Start calls StartFunc.
func (mock *GlobalRoleControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("GlobalRoleControllerMock.StartFunc: method is nil but GlobalRoleController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockGlobalRoleControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockGlobalRoleControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedGlobalRoleController.StartCalls())
func (mock *GlobalRoleControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockGlobalRoleControllerMockStart.RLock()
calls = mock.calls.Start
lockGlobalRoleControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *GlobalRoleControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("GlobalRoleControllerMock.SyncFunc: method is nil but GlobalRoleController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockGlobalRoleControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockGlobalRoleControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedGlobalRoleController.SyncCalls())
func (mock *GlobalRoleControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockGlobalRoleControllerMockSync.RLock()
calls = mock.calls.Sync
lockGlobalRoleControllerMockSync.RUnlock()
return calls
}
var (
lockGlobalRoleInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockGlobalRoleInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex

Some files were not shown because too many files have changed in this diff Show More