• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

k8snetworkplumbingwg / sriov-network-operator / 13526205039

25 Feb 2025 04:34PM UTC coverage: 48.882% (+0.9%) from 48.008%
13526205039

Pull #788

github

web-flow
Merge 3e6b91cf3 into d7c9458e0
Pull Request #788: Daemon redesign - using controller-runtime

273 of 615 new or added lines in 18 files covered. (44.39%)

199 existing lines in 12 files now uncovered.

7324 of 14983 relevant lines covered (48.88%)

0.54 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/pkg/client/informers/externalversions/sriovnetwork/v1/sriovnetworknodestate.go
1
// Code generated by informer-gen. DO NOT EDIT.
2

3
package v1
4

5
import (
6
        "context"
7
        time "time"
8

9
        metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
10
        runtime "k8s.io/apimachinery/pkg/runtime"
11
        watch "k8s.io/apimachinery/pkg/watch"
12
        cache "k8s.io/client-go/tools/cache"
13

14
        sriovnetworkv1 "github.com/k8snetworkplumbingwg/sriov-network-operator/api/v1"
15
        versioned "github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/client/clientset/versioned"
16
        internalinterfaces "github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/client/informers/externalversions/internalinterfaces"
17
        v1 "github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/client/listers/sriovnetwork/v1"
18
)
19

20
// SriovNetworkNodeStateInformer provides access to a shared informer and lister for
21
// SriovNetworkNodeStates.
22
type SriovNetworkNodeStateInformer interface {
23
        Informer() cache.SharedIndexInformer
24
        Lister() v1.SriovNetworkNodeStateLister
25
}
26

27
type sriovNetworkNodeStateInformer struct {
28
        factory          internalinterfaces.SharedInformerFactory
29
        tweakListOptions internalinterfaces.TweakListOptionsFunc
30
        namespace        string
31
}
32

33
// NewSriovNetworkNodeStateInformer constructs a new informer for SriovNetworkNodeState type.
34
// Always prefer using an informer factory to get a shared informer instead of getting an independent
35
// one. This reduces memory footprint and number of connections to the server.
36
func NewSriovNetworkNodeStateInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
×
37
        return NewFilteredSriovNetworkNodeStateInformer(client, namespace, resyncPeriod, indexers, nil)
×
38
}
×
39

40
// NewFilteredSriovNetworkNodeStateInformer constructs a new informer for SriovNetworkNodeState type.
41
// Always prefer using an informer factory to get a shared informer instead of getting an independent
42
// one. This reduces memory footprint and number of connections to the server.
UNCOV
43
func NewFilteredSriovNetworkNodeStateInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
×
UNCOV
44
        return cache.NewSharedIndexInformer(
×
UNCOV
45
                &cache.ListWatch{
×
UNCOV
46
                        ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
×
UNCOV
47
                                if tweakListOptions != nil {
×
UNCOV
48
                                        tweakListOptions(&options)
×
UNCOV
49
                                }
×
UNCOV
50
                                return client.SriovnetworkV1().SriovNetworkNodeStates(namespace).List(context.TODO(), options)
×
51
                        },
UNCOV
52
                        WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
×
UNCOV
53
                                if tweakListOptions != nil {
×
UNCOV
54
                                        tweakListOptions(&options)
×
UNCOV
55
                                }
×
UNCOV
56
                                return client.SriovnetworkV1().SriovNetworkNodeStates(namespace).Watch(context.TODO(), options)
×
57
                        },
58
                },
59
                &sriovnetworkv1.SriovNetworkNodeState{},
60
                resyncPeriod,
61
                indexers,
62
        )
63
}
64

UNCOV
65
func (f *sriovNetworkNodeStateInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
×
UNCOV
66
        return NewFilteredSriovNetworkNodeStateInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
×
UNCOV
67
}
×
68

UNCOV
69
func (f *sriovNetworkNodeStateInformer) Informer() cache.SharedIndexInformer {
×
UNCOV
70
        return f.factory.InformerFor(&sriovnetworkv1.SriovNetworkNodeState{}, f.defaultInformer)
×
UNCOV
71
}
×
72

73
func (f *sriovNetworkNodeStateInformer) Lister() v1.SriovNetworkNodeStateLister {
×
74
        return v1.NewSriovNetworkNodeStateLister(f.Informer().GetIndexer())
×
75
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc