mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-12 14:30:12 +01:00
feat(beta): autogen code for v1 CRDs
Signed-off-by: Pawan <pawan@mayadata.io>
This commit is contained in:
parent
472fd603ac
commit
1e23607d8a
22 changed files with 433 additions and 212 deletions
|
|
@ -20,13 +20,13 @@ package zfs
|
|||
|
||||
import (
|
||||
internalinterfaces "github.com/openebs/zfs-localpv/pkg/generated/informer/externalversions/internalinterfaces"
|
||||
v1alpha1 "github.com/openebs/zfs-localpv/pkg/generated/informer/externalversions/zfs/v1alpha1"
|
||||
v1 "github.com/openebs/zfs-localpv/pkg/generated/informer/externalversions/zfs/v1"
|
||||
)
|
||||
|
||||
// Interface provides access to each of this group's versions.
|
||||
type Interface interface {
|
||||
// V1alpha1 provides access to shared informers for resources in V1alpha1.
|
||||
V1alpha1() v1alpha1.Interface
|
||||
// V1 provides access to shared informers for resources in V1.
|
||||
V1() v1.Interface
|
||||
}
|
||||
|
||||
type group struct {
|
||||
|
|
@ -40,7 +40,7 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
|||
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// V1alpha1 returns a new v1alpha1.Interface.
|
||||
func (g *group) V1alpha1() v1alpha1.Interface {
|
||||
return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions)
|
||||
// V1 returns a new v1.Interface.
|
||||
func (g *group) V1() v1.Interface {
|
||||
return v1.New(g.factory, g.namespace, g.tweakListOptions)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1
|
||||
|
||||
import (
|
||||
internalinterfaces "github.com/openebs/zfs-localpv/pkg/generated/informer/externalversions/internalinterfaces"
|
||||
|
|
@ -16,16 +16,16 @@ limitations under the License.
|
|||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
zfsv1alpha1 "github.com/openebs/zfs-localpv/pkg/apis/openebs.io/zfs/v1alpha1"
|
||||
zfsv1 "github.com/openebs/zfs-localpv/pkg/apis/openebs.io/zfs/v1"
|
||||
internalclientset "github.com/openebs/zfs-localpv/pkg/generated/clientset/internalclientset"
|
||||
internalinterfaces "github.com/openebs/zfs-localpv/pkg/generated/informer/externalversions/internalinterfaces"
|
||||
v1alpha1 "github.com/openebs/zfs-localpv/pkg/generated/lister/zfs/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "github.com/openebs/zfs-localpv/pkg/generated/lister/zfs/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
|
|
@ -35,7 +35,7 @@ import (
|
|||
// ZFSSnapshots.
|
||||
type ZFSSnapshotInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha1.ZFSSnapshotLister
|
||||
Lister() v1.ZFSSnapshotLister
|
||||
}
|
||||
|
||||
type zFSSnapshotInformer struct {
|
||||
|
|
@ -57,20 +57,20 @@ func NewZFSSnapshotInformer(client internalclientset.Interface, namespace string
|
|||
func NewFilteredZFSSnapshotInformer(client internalclientset.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ZfsV1alpha1().ZFSSnapshots(namespace).List(options)
|
||||
return client.ZfsV1().ZFSSnapshots(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ZfsV1alpha1().ZFSSnapshots(namespace).Watch(options)
|
||||
return client.ZfsV1().ZFSSnapshots(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&zfsv1alpha1.ZFSSnapshot{},
|
||||
&zfsv1.ZFSSnapshot{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
|
|
@ -81,9 +81,9 @@ func (f *zFSSnapshotInformer) defaultInformer(client internalclientset.Interface
|
|||
}
|
||||
|
||||
func (f *zFSSnapshotInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&zfsv1alpha1.ZFSSnapshot{}, f.defaultInformer)
|
||||
return f.factory.InformerFor(&zfsv1.ZFSSnapshot{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *zFSSnapshotInformer) Lister() v1alpha1.ZFSSnapshotLister {
|
||||
return v1alpha1.NewZFSSnapshotLister(f.Informer().GetIndexer())
|
||||
func (f *zFSSnapshotInformer) Lister() v1.ZFSSnapshotLister {
|
||||
return v1.NewZFSSnapshotLister(f.Informer().GetIndexer())
|
||||
}
|
||||
|
|
@ -16,16 +16,16 @@ limitations under the License.
|
|||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
zfsv1alpha1 "github.com/openebs/zfs-localpv/pkg/apis/openebs.io/zfs/v1alpha1"
|
||||
zfsv1 "github.com/openebs/zfs-localpv/pkg/apis/openebs.io/zfs/v1"
|
||||
internalclientset "github.com/openebs/zfs-localpv/pkg/generated/clientset/internalclientset"
|
||||
internalinterfaces "github.com/openebs/zfs-localpv/pkg/generated/informer/externalversions/internalinterfaces"
|
||||
v1alpha1 "github.com/openebs/zfs-localpv/pkg/generated/lister/zfs/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "github.com/openebs/zfs-localpv/pkg/generated/lister/zfs/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
|
|
@ -35,7 +35,7 @@ import (
|
|||
// ZFSVolumes.
|
||||
type ZFSVolumeInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha1.ZFSVolumeLister
|
||||
Lister() v1.ZFSVolumeLister
|
||||
}
|
||||
|
||||
type zFSVolumeInformer struct {
|
||||
|
|
@ -57,20 +57,20 @@ func NewZFSVolumeInformer(client internalclientset.Interface, namespace string,
|
|||
func NewFilteredZFSVolumeInformer(client internalclientset.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ZfsV1alpha1().ZFSVolumes(namespace).List(options)
|
||||
return client.ZfsV1().ZFSVolumes(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ZfsV1alpha1().ZFSVolumes(namespace).Watch(options)
|
||||
return client.ZfsV1().ZFSVolumes(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&zfsv1alpha1.ZFSVolume{},
|
||||
&zfsv1.ZFSVolume{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
|
|
@ -81,9 +81,9 @@ func (f *zFSVolumeInformer) defaultInformer(client internalclientset.Interface,
|
|||
}
|
||||
|
||||
func (f *zFSVolumeInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&zfsv1alpha1.ZFSVolume{}, f.defaultInformer)
|
||||
return f.factory.InformerFor(&zfsv1.ZFSVolume{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *zFSVolumeInformer) Lister() v1alpha1.ZFSVolumeLister {
|
||||
return v1alpha1.NewZFSVolumeLister(f.Informer().GetIndexer())
|
||||
func (f *zFSVolumeInformer) Lister() v1.ZFSVolumeLister {
|
||||
return v1.NewZFSVolumeLister(f.Informer().GetIndexer())
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue