Dataset Viewer
Auto-converted to Parquet
code
stringlengths
12
335k
docstring
stringlengths
20
20.8k
func_name
stringlengths
1
105
language
stringclasses
1 value
repo
stringclasses
498 values
path
stringlengths
5
172
url
stringlengths
43
235
license
stringclasses
4 values
func (c *Clientset) StorageV1beta1() storagev1beta1.StorageV1beta1Interface { return &fakestoragev1beta1.FakeStorageV1beta1{Fake: &c.Fake} }
StorageV1beta1 retrieves the StorageV1beta1Client
StorageV1beta1
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/kubernetes/fake/clientset_generated.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/kubernetes/fake/clientset_generated.go
Apache-2.0
func (c *Clientset) StorageV1() storagev1.StorageV1Interface { return &fakestoragev1.FakeStorageV1{Fake: &c.Fake} }
StorageV1 retrieves the StorageV1Client
StorageV1
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/kubernetes/fake/clientset_generated.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/kubernetes/fake/clientset_generated.go
Apache-2.0
func (c *Clientset) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface { return &fakestoragev1alpha1.FakeStorageV1alpha1{Fake: &c.Fake} }
StorageV1alpha1 retrieves the StorageV1alpha1Client
StorageV1alpha1
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/kubernetes/fake/clientset_generated.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/kubernetes/fake/clientset_generated.go
Apache-2.0
func NewEndpointSliceLister(indexer cache.Indexer) EndpointSliceLister { return &endpointSliceLister{indexer: indexer} }
NewEndpointSliceLister returns a new EndpointSliceLister.
NewEndpointSliceLister
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/discovery/v1beta1/endpointslice.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/discovery/v1beta1/endpointslice.go
Apache-2.0
func (s *endpointSliceLister) List(selector labels.Selector) (ret []*v1beta1.EndpointSlice, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.EndpointSlice)) }) return ret, err }
List lists all EndpointSlices in the indexer.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/discovery/v1beta1/endpointslice.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/discovery/v1beta1/endpointslice.go
Apache-2.0
func (s *endpointSliceLister) EndpointSlices(namespace string) EndpointSliceNamespaceLister { return endpointSliceNamespaceLister{indexer: s.indexer, namespace: namespace} }
EndpointSlices returns an object that can list and get EndpointSlices.
EndpointSlices
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/discovery/v1beta1/endpointslice.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/discovery/v1beta1/endpointslice.go
Apache-2.0
func (s endpointSliceNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.EndpointSlice, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.EndpointSlice)) }) return ret, err }
List lists all EndpointSlices in the indexer for a given namespace.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/discovery/v1beta1/endpointslice.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/discovery/v1beta1/endpointslice.go
Apache-2.0
func (s endpointSliceNamespaceLister) Get(name string) (*v1beta1.EndpointSlice, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err } if !exists { return nil, errors.NewNotFound(v1beta1.Resource("endpointslice"), name) } return obj.(*v1beta1.EndpointSlice), nil }
Get retrieves the EndpointSlice from the indexer for a given namespace and name.
Get
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/discovery/v1beta1/endpointslice.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/discovery/v1beta1/endpointslice.go
Apache-2.0
func NewEndpointSliceLister(indexer cache.Indexer) EndpointSliceLister { return &endpointSliceLister{indexer: indexer} }
NewEndpointSliceLister returns a new EndpointSliceLister.
NewEndpointSliceLister
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/discovery/v1/endpointslice.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/discovery/v1/endpointslice.go
Apache-2.0
func (s *endpointSliceLister) List(selector labels.Selector) (ret []*v1.EndpointSlice, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.EndpointSlice)) }) return ret, err }
List lists all EndpointSlices in the indexer.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/discovery/v1/endpointslice.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/discovery/v1/endpointslice.go
Apache-2.0
func (s *endpointSliceLister) EndpointSlices(namespace string) EndpointSliceNamespaceLister { return endpointSliceNamespaceLister{indexer: s.indexer, namespace: namespace} }
EndpointSlices returns an object that can list and get EndpointSlices.
EndpointSlices
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/discovery/v1/endpointslice.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/discovery/v1/endpointslice.go
Apache-2.0
func (s endpointSliceNamespaceLister) List(selector labels.Selector) (ret []*v1.EndpointSlice, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.EndpointSlice)) }) return ret, err }
List lists all EndpointSlices in the indexer for a given namespace.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/discovery/v1/endpointslice.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/discovery/v1/endpointslice.go
Apache-2.0
func (s endpointSliceNamespaceLister) Get(name string) (*v1.EndpointSlice, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err } if !exists { return nil, errors.NewNotFound(v1.Resource("endpointslice"), name) } return obj.(*v1.EndpointSlice), nil }
Get retrieves the EndpointSlice from the indexer for a given namespace and name.
Get
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/discovery/v1/endpointslice.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/discovery/v1/endpointslice.go
Apache-2.0
func NewIngressClassLister(indexer cache.Indexer) IngressClassLister { return &ingressClassLister{indexer: indexer} }
NewIngressClassLister returns a new IngressClassLister.
NewIngressClassLister
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1beta1/ingressclass.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1beta1/ingressclass.go
Apache-2.0
func (s *ingressClassLister) List(selector labels.Selector) (ret []*v1beta1.IngressClass, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.IngressClass)) }) return ret, err }
List lists all IngressClasses in the indexer.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1beta1/ingressclass.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1beta1/ingressclass.go
Apache-2.0
func (s *ingressClassLister) Get(name string) (*v1beta1.IngressClass, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err } if !exists { return nil, errors.NewNotFound(v1beta1.Resource("ingressclass"), name) } return obj.(*v1beta1.IngressClass), nil }
Get retrieves the IngressClass from the index for a given name.
Get
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1beta1/ingressclass.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1beta1/ingressclass.go
Apache-2.0
func NewIngressLister(indexer cache.Indexer) IngressLister { return &ingressLister{indexer: indexer} }
NewIngressLister returns a new IngressLister.
NewIngressLister
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1beta1/ingress.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1beta1/ingress.go
Apache-2.0
func (s *ingressLister) List(selector labels.Selector) (ret []*v1beta1.Ingress, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.Ingress)) }) return ret, err }
List lists all Ingresses in the indexer.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1beta1/ingress.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1beta1/ingress.go
Apache-2.0
func (s *ingressLister) Ingresses(namespace string) IngressNamespaceLister { return ingressNamespaceLister{indexer: s.indexer, namespace: namespace} }
Ingresses returns an object that can list and get Ingresses.
Ingresses
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1beta1/ingress.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1beta1/ingress.go
Apache-2.0
func (s ingressNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Ingress, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.Ingress)) }) return ret, err }
List lists all Ingresses in the indexer for a given namespace.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1beta1/ingress.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1beta1/ingress.go
Apache-2.0
func (s ingressNamespaceLister) Get(name string) (*v1beta1.Ingress, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err } if !exists { return nil, errors.NewNotFound(v1beta1.Resource("ingress"), name) } return obj.(*v1beta1.Ingress), nil }
Get retrieves the Ingress from the indexer for a given namespace and name.
Get
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1beta1/ingress.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1beta1/ingress.go
Apache-2.0
func NewNetworkPolicyLister(indexer cache.Indexer) NetworkPolicyLister { return &networkPolicyLister{indexer: indexer} }
NewNetworkPolicyLister returns a new NetworkPolicyLister.
NewNetworkPolicyLister
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1/networkpolicy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1/networkpolicy.go
Apache-2.0
func (s *networkPolicyLister) List(selector labels.Selector) (ret []*v1.NetworkPolicy, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.NetworkPolicy)) }) return ret, err }
List lists all NetworkPolicies in the indexer.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1/networkpolicy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1/networkpolicy.go
Apache-2.0
func (s *networkPolicyLister) NetworkPolicies(namespace string) NetworkPolicyNamespaceLister { return networkPolicyNamespaceLister{indexer: s.indexer, namespace: namespace} }
NetworkPolicies returns an object that can list and get NetworkPolicies.
NetworkPolicies
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1/networkpolicy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1/networkpolicy.go
Apache-2.0
func (s networkPolicyNamespaceLister) List(selector labels.Selector) (ret []*v1.NetworkPolicy, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.NetworkPolicy)) }) return ret, err }
List lists all NetworkPolicies in the indexer for a given namespace.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1/networkpolicy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1/networkpolicy.go
Apache-2.0
func (s networkPolicyNamespaceLister) Get(name string) (*v1.NetworkPolicy, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err } if !exists { return nil, errors.NewNotFound(v1.Resource("networkpolicy"), name) } return obj.(*v1.NetworkPolicy), nil }
Get retrieves the NetworkPolicy from the indexer for a given namespace and name.
Get
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1/networkpolicy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1/networkpolicy.go
Apache-2.0
func NewIngressClassLister(indexer cache.Indexer) IngressClassLister { return &ingressClassLister{indexer: indexer} }
NewIngressClassLister returns a new IngressClassLister.
NewIngressClassLister
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1/ingressclass.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1/ingressclass.go
Apache-2.0
func (s *ingressClassLister) List(selector labels.Selector) (ret []*v1.IngressClass, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.IngressClass)) }) return ret, err }
List lists all IngressClasses in the indexer.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1/ingressclass.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1/ingressclass.go
Apache-2.0
func (s *ingressClassLister) Get(name string) (*v1.IngressClass, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err } if !exists { return nil, errors.NewNotFound(v1.Resource("ingressclass"), name) } return obj.(*v1.IngressClass), nil }
Get retrieves the IngressClass from the index for a given name.
Get
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1/ingressclass.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1/ingressclass.go
Apache-2.0
func NewIngressLister(indexer cache.Indexer) IngressLister { return &ingressLister{indexer: indexer} }
NewIngressLister returns a new IngressLister.
NewIngressLister
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1/ingress.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1/ingress.go
Apache-2.0
func (s *ingressLister) List(selector labels.Selector) (ret []*v1.Ingress, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.Ingress)) }) return ret, err }
List lists all Ingresses in the indexer.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1/ingress.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1/ingress.go
Apache-2.0
func (s *ingressLister) Ingresses(namespace string) IngressNamespaceLister { return ingressNamespaceLister{indexer: s.indexer, namespace: namespace} }
Ingresses returns an object that can list and get Ingresses.
Ingresses
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1/ingress.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1/ingress.go
Apache-2.0
func (s ingressNamespaceLister) List(selector labels.Selector) (ret []*v1.Ingress, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.Ingress)) }) return ret, err }
List lists all Ingresses in the indexer for a given namespace.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1/ingress.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1/ingress.go
Apache-2.0
func (s ingressNamespaceLister) Get(name string) (*v1.Ingress, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err } if !exists { return nil, errors.NewNotFound(v1.Resource("ingress"), name) } return obj.(*v1.Ingress), nil }
Get retrieves the Ingress from the indexer for a given namespace and name.
Get
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1/ingress.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1/ingress.go
Apache-2.0
func NewServiceCIDRLister(indexer cache.Indexer) ServiceCIDRLister { return &serviceCIDRLister{indexer: indexer} }
NewServiceCIDRLister returns a new ServiceCIDRLister.
NewServiceCIDRLister
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1alpha1/servicecidr.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1alpha1/servicecidr.go
Apache-2.0
func (s *serviceCIDRLister) List(selector labels.Selector) (ret []*v1alpha1.ServiceCIDR, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1alpha1.ServiceCIDR)) }) return ret, err }
List lists all ServiceCIDRs in the indexer.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1alpha1/servicecidr.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1alpha1/servicecidr.go
Apache-2.0
func (s *serviceCIDRLister) Get(name string) (*v1alpha1.ServiceCIDR, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err } if !exists { return nil, errors.NewNotFound(v1alpha1.Resource("servicecidr"), name) } return obj.(*v1alpha1.ServiceCIDR), nil }
Get retrieves the ServiceCIDR from the index for a given name.
Get
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1alpha1/servicecidr.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1alpha1/servicecidr.go
Apache-2.0
func NewIPAddressLister(indexer cache.Indexer) IPAddressLister { return &iPAddressLister{indexer: indexer} }
NewIPAddressLister returns a new IPAddressLister.
NewIPAddressLister
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1alpha1/ipaddress.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1alpha1/ipaddress.go
Apache-2.0
func (s *iPAddressLister) List(selector labels.Selector) (ret []*v1alpha1.IPAddress, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1alpha1.IPAddress)) }) return ret, err }
List lists all IPAddresses in the indexer.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1alpha1/ipaddress.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1alpha1/ipaddress.go
Apache-2.0
func (s *iPAddressLister) Get(name string) (*v1alpha1.IPAddress, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err } if !exists { return nil, errors.NewNotFound(v1alpha1.Resource("ipaddress"), name) } return obj.(*v1alpha1.IPAddress), nil }
Get retrieves the IPAddress from the index for a given name.
Get
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/networking/v1alpha1/ipaddress.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/networking/v1alpha1/ipaddress.go
Apache-2.0
func NewHorizontalPodAutoscalerLister(indexer cache.Indexer) HorizontalPodAutoscalerLister { return &horizontalPodAutoscalerLister{indexer: indexer} }
NewHorizontalPodAutoscalerLister returns a new HorizontalPodAutoscalerLister.
NewHorizontalPodAutoscalerLister
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/autoscaling/v2/horizontalpodautoscaler.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/autoscaling/v2/horizontalpodautoscaler.go
Apache-2.0
func (s *horizontalPodAutoscalerLister) List(selector labels.Selector) (ret []*v2.HorizontalPodAutoscaler, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v2.HorizontalPodAutoscaler)) }) return ret, err }
List lists all HorizontalPodAutoscalers in the indexer.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/autoscaling/v2/horizontalpodautoscaler.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/autoscaling/v2/horizontalpodautoscaler.go
Apache-2.0
func (s *horizontalPodAutoscalerLister) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister { return horizontalPodAutoscalerNamespaceLister{indexer: s.indexer, namespace: namespace} }
HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers.
HorizontalPodAutoscalers
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/autoscaling/v2/horizontalpodautoscaler.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/autoscaling/v2/horizontalpodautoscaler.go
Apache-2.0
func (s horizontalPodAutoscalerNamespaceLister) List(selector labels.Selector) (ret []*v2.HorizontalPodAutoscaler, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v2.HorizontalPodAutoscaler)) }) return ret, err }
List lists all HorizontalPodAutoscalers in the indexer for a given namespace.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/autoscaling/v2/horizontalpodautoscaler.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/autoscaling/v2/horizontalpodautoscaler.go
Apache-2.0
func (s horizontalPodAutoscalerNamespaceLister) Get(name string) (*v2.HorizontalPodAutoscaler, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err } if !exists { return nil, errors.NewNotFound(v2.Resource("horizontalpodautoscaler"), name) } return obj.(*v2.HorizontalPodAutoscaler), nil }
Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name.
Get
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/autoscaling/v2/horizontalpodautoscaler.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/autoscaling/v2/horizontalpodautoscaler.go
Apache-2.0
func NewHorizontalPodAutoscalerLister(indexer cache.Indexer) HorizontalPodAutoscalerLister { return &horizontalPodAutoscalerLister{indexer: indexer} }
NewHorizontalPodAutoscalerLister returns a new HorizontalPodAutoscalerLister.
NewHorizontalPodAutoscalerLister
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/autoscaling/v2beta2/horizontalpodautoscaler.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/autoscaling/v2beta2/horizontalpodautoscaler.go
Apache-2.0
func (s *horizontalPodAutoscalerLister) List(selector labels.Selector) (ret []*v2beta2.HorizontalPodAutoscaler, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v2beta2.HorizontalPodAutoscaler)) }) return ret, err }
List lists all HorizontalPodAutoscalers in the indexer.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/autoscaling/v2beta2/horizontalpodautoscaler.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/autoscaling/v2beta2/horizontalpodautoscaler.go
Apache-2.0
func (s *horizontalPodAutoscalerLister) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister { return horizontalPodAutoscalerNamespaceLister{indexer: s.indexer, namespace: namespace} }
HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers.
HorizontalPodAutoscalers
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/autoscaling/v2beta2/horizontalpodautoscaler.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/autoscaling/v2beta2/horizontalpodautoscaler.go
Apache-2.0
func (s horizontalPodAutoscalerNamespaceLister) List(selector labels.Selector) (ret []*v2beta2.HorizontalPodAutoscaler, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v2beta2.HorizontalPodAutoscaler)) }) return ret, err }
List lists all HorizontalPodAutoscalers in the indexer for a given namespace.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/autoscaling/v2beta2/horizontalpodautoscaler.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/autoscaling/v2beta2/horizontalpodautoscaler.go
Apache-2.0
func (s horizontalPodAutoscalerNamespaceLister) Get(name string) (*v2beta2.HorizontalPodAutoscaler, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err } if !exists { return nil, errors.NewNotFound(v2beta2.Resource("horizontalpodautoscaler"), name) } return obj.(*v2beta2.HorizontalPodAutoscaler), nil }
Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name.
Get
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/autoscaling/v2beta2/horizontalpodautoscaler.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/autoscaling/v2beta2/horizontalpodautoscaler.go
Apache-2.0
func NewHorizontalPodAutoscalerLister(indexer cache.Indexer) HorizontalPodAutoscalerLister { return &horizontalPodAutoscalerLister{indexer: indexer} }
NewHorizontalPodAutoscalerLister returns a new HorizontalPodAutoscalerLister.
NewHorizontalPodAutoscalerLister
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go
Apache-2.0
func (s *horizontalPodAutoscalerLister) List(selector labels.Selector) (ret []*v1.HorizontalPodAutoscaler, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.HorizontalPodAutoscaler)) }) return ret, err }
List lists all HorizontalPodAutoscalers in the indexer.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go
Apache-2.0
func (s *horizontalPodAutoscalerLister) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister { return horizontalPodAutoscalerNamespaceLister{indexer: s.indexer, namespace: namespace} }
HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers.
HorizontalPodAutoscalers
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go
Apache-2.0
func (s horizontalPodAutoscalerNamespaceLister) List(selector labels.Selector) (ret []*v1.HorizontalPodAutoscaler, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.HorizontalPodAutoscaler)) }) return ret, err }
List lists all HorizontalPodAutoscalers in the indexer for a given namespace.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go
Apache-2.0
func (s horizontalPodAutoscalerNamespaceLister) Get(name string) (*v1.HorizontalPodAutoscaler, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err } if !exists { return nil, errors.NewNotFound(v1.Resource("horizontalpodautoscaler"), name) } return obj.(*v1.HorizontalPodAutoscaler), nil }
Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name.
Get
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go
Apache-2.0
func NewHorizontalPodAutoscalerLister(indexer cache.Indexer) HorizontalPodAutoscalerLister { return &horizontalPodAutoscalerLister{indexer: indexer} }
NewHorizontalPodAutoscalerLister returns a new HorizontalPodAutoscalerLister.
NewHorizontalPodAutoscalerLister
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go
Apache-2.0
func (s *horizontalPodAutoscalerLister) List(selector labels.Selector) (ret []*v2beta1.HorizontalPodAutoscaler, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v2beta1.HorizontalPodAutoscaler)) }) return ret, err }
List lists all HorizontalPodAutoscalers in the indexer.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go
Apache-2.0
func (s *horizontalPodAutoscalerLister) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister { return horizontalPodAutoscalerNamespaceLister{indexer: s.indexer, namespace: namespace} }
HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers.
HorizontalPodAutoscalers
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go
Apache-2.0
func (s horizontalPodAutoscalerNamespaceLister) List(selector labels.Selector) (ret []*v2beta1.HorizontalPodAutoscaler, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v2beta1.HorizontalPodAutoscaler)) }) return ret, err }
List lists all HorizontalPodAutoscalers in the indexer for a given namespace.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go
Apache-2.0
func (s horizontalPodAutoscalerNamespaceLister) Get(name string) (*v2beta1.HorizontalPodAutoscaler, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err } if !exists { return nil, errors.NewNotFound(v2beta1.Resource("horizontalpodautoscaler"), name) } return obj.(*v2beta1.HorizontalPodAutoscaler), nil }
Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name.
Get
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go
Apache-2.0
func NewEvictionLister(indexer cache.Indexer) EvictionLister { return &evictionLister{indexer: indexer} }
NewEvictionLister returns a new EvictionLister.
NewEvictionLister
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/policy/v1beta1/eviction.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/policy/v1beta1/eviction.go
Apache-2.0
func (s *evictionLister) List(selector labels.Selector) (ret []*v1beta1.Eviction, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.Eviction)) }) return ret, err }
List lists all Evictions in the indexer.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/policy/v1beta1/eviction.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/policy/v1beta1/eviction.go
Apache-2.0
func (s *evictionLister) Evictions(namespace string) EvictionNamespaceLister { return evictionNamespaceLister{indexer: s.indexer, namespace: namespace} }
Evictions returns an object that can list and get Evictions.
Evictions
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/policy/v1beta1/eviction.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/policy/v1beta1/eviction.go
Apache-2.0
func (s evictionNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Eviction, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.Eviction)) }) return ret, err }
List lists all Evictions in the indexer for a given namespace.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/policy/v1beta1/eviction.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/policy/v1beta1/eviction.go
Apache-2.0
func (s evictionNamespaceLister) Get(name string) (*v1beta1.Eviction, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err } if !exists { return nil, errors.NewNotFound(v1beta1.Resource("eviction"), name) } return obj.(*v1beta1.Eviction), nil }
Get retrieves the Eviction from the indexer for a given namespace and name.
Get
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/policy/v1beta1/eviction.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/policy/v1beta1/eviction.go
Apache-2.0
func (s *podDisruptionBudgetLister) GetPodPodDisruptionBudgets(pod *v1.Pod) ([]*policy.PodDisruptionBudget, error) { var selector labels.Selector list, err := s.PodDisruptionBudgets(pod.Namespace).List(labels.Everything()) if err != nil { return nil, err } var pdbList []*policy.PodDisruptionBudget for i := range list { pdb := list[i] selector, err = metav1.LabelSelectorAsSelector(pdb.Spec.Selector) if err != nil { // This object has an invalid selector, it does not match the pod continue } // If a PDB with a nil or empty selector creeps in, it should match nothing, not everything. if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { continue } pdbList = append(pdbList, pdb) } if len(pdbList) == 0 { return nil, fmt.Errorf("could not find PodDisruptionBudget for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) } return pdbList, nil }
GetPodPodDisruptionBudgets returns a list of PodDisruptionBudgets matching a pod. Returns an error only if no matching PodDisruptionBudgets are found.
GetPodPodDisruptionBudgets
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget_expansion.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget_expansion.go
Apache-2.0
func NewPodDisruptionBudgetLister(indexer cache.Indexer) PodDisruptionBudgetLister { return &podDisruptionBudgetLister{indexer: indexer} }
NewPodDisruptionBudgetLister returns a new PodDisruptionBudgetLister.
NewPodDisruptionBudgetLister
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go
Apache-2.0
func (s *podDisruptionBudgetLister) List(selector labels.Selector) (ret []*v1beta1.PodDisruptionBudget, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.PodDisruptionBudget)) }) return ret, err }
List lists all PodDisruptionBudgets in the indexer.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go
Apache-2.0
func (s *podDisruptionBudgetLister) PodDisruptionBudgets(namespace string) PodDisruptionBudgetNamespaceLister { return podDisruptionBudgetNamespaceLister{indexer: s.indexer, namespace: namespace} }
PodDisruptionBudgets returns an object that can list and get PodDisruptionBudgets.
PodDisruptionBudgets
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go
Apache-2.0
func (s podDisruptionBudgetNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.PodDisruptionBudget, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.PodDisruptionBudget)) }) return ret, err }
List lists all PodDisruptionBudgets in the indexer for a given namespace.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go
Apache-2.0
func (s podDisruptionBudgetNamespaceLister) Get(name string) (*v1beta1.PodDisruptionBudget, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err } if !exists { return nil, errors.NewNotFound(v1beta1.Resource("poddisruptionbudget"), name) } return obj.(*v1beta1.PodDisruptionBudget), nil }
Get retrieves the PodDisruptionBudget from the indexer for a given namespace and name.
Get
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go
Apache-2.0
func NewEvictionLister(indexer cache.Indexer) EvictionLister { return &evictionLister{indexer: indexer} }
NewEvictionLister returns a new EvictionLister.
NewEvictionLister
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/policy/v1/eviction.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/policy/v1/eviction.go
Apache-2.0
func (s *evictionLister) List(selector labels.Selector) (ret []*v1.Eviction, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.Eviction)) }) return ret, err }
List lists all Evictions in the indexer.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/policy/v1/eviction.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/policy/v1/eviction.go
Apache-2.0
func (s *evictionLister) Evictions(namespace string) EvictionNamespaceLister { return evictionNamespaceLister{indexer: s.indexer, namespace: namespace} }
Evictions returns an object that can list and get Evictions.
Evictions
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/policy/v1/eviction.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/policy/v1/eviction.go
Apache-2.0
func (s evictionNamespaceLister) List(selector labels.Selector) (ret []*v1.Eviction, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.Eviction)) }) return ret, err }
List lists all Evictions in the indexer for a given namespace.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/policy/v1/eviction.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/policy/v1/eviction.go
Apache-2.0
func (s evictionNamespaceLister) Get(name string) (*v1.Eviction, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err } if !exists { return nil, errors.NewNotFound(v1.Resource("eviction"), name) } return obj.(*v1.Eviction), nil }
Get retrieves the Eviction from the indexer for a given namespace and name.
Get
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/policy/v1/eviction.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/policy/v1/eviction.go
Apache-2.0
func (s *podDisruptionBudgetLister) GetPodPodDisruptionBudgets(pod *v1.Pod) ([]*policy.PodDisruptionBudget, error) { var selector labels.Selector list, err := s.PodDisruptionBudgets(pod.Namespace).List(labels.Everything()) if err != nil { return nil, err } var pdbList []*policy.PodDisruptionBudget for i := range list { pdb := list[i] selector, err = metav1.LabelSelectorAsSelector(pdb.Spec.Selector) if err != nil { // This object has an invalid selector, it does not match the pod continue } // Unlike the v1beta version, here we let an empty selector match everything. if !selector.Matches(labels.Set(pod.Labels)) { continue } pdbList = append(pdbList, pdb) } if len(pdbList) == 0 { return nil, fmt.Errorf("could not find PodDisruptionBudget for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) } return pdbList, nil }
GetPodPodDisruptionBudgets returns a list of PodDisruptionBudgets matching a pod.
GetPodPodDisruptionBudgets
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/policy/v1/poddisruptionbudget_expansion.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/policy/v1/poddisruptionbudget_expansion.go
Apache-2.0
func NewPodDisruptionBudgetLister(indexer cache.Indexer) PodDisruptionBudgetLister { return &podDisruptionBudgetLister{indexer: indexer} }
NewPodDisruptionBudgetLister returns a new PodDisruptionBudgetLister.
NewPodDisruptionBudgetLister
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/policy/v1/poddisruptionbudget.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/policy/v1/poddisruptionbudget.go
Apache-2.0
func (s *podDisruptionBudgetLister) List(selector labels.Selector) (ret []*v1.PodDisruptionBudget, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.PodDisruptionBudget)) }) return ret, err }
List lists all PodDisruptionBudgets in the indexer.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/policy/v1/poddisruptionbudget.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/policy/v1/poddisruptionbudget.go
Apache-2.0
func (s *podDisruptionBudgetLister) PodDisruptionBudgets(namespace string) PodDisruptionBudgetNamespaceLister { return podDisruptionBudgetNamespaceLister{indexer: s.indexer, namespace: namespace} }
PodDisruptionBudgets returns an object that can list and get PodDisruptionBudgets.
PodDisruptionBudgets
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/policy/v1/poddisruptionbudget.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/policy/v1/poddisruptionbudget.go
Apache-2.0
func (s podDisruptionBudgetNamespaceLister) List(selector labels.Selector) (ret []*v1.PodDisruptionBudget, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.PodDisruptionBudget)) }) return ret, err }
List lists all PodDisruptionBudgets in the indexer for a given namespace.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/policy/v1/poddisruptionbudget.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/policy/v1/poddisruptionbudget.go
Apache-2.0
func (s podDisruptionBudgetNamespaceLister) Get(name string) (*v1.PodDisruptionBudget, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err } if !exists { return nil, errors.NewNotFound(v1.Resource("poddisruptionbudget"), name) } return obj.(*v1.PodDisruptionBudget), nil }
Get retrieves the PodDisruptionBudget from the indexer for a given namespace and name.
Get
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/policy/v1/poddisruptionbudget.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/policy/v1/poddisruptionbudget.go
Apache-2.0
func NewVolumeAttachmentLister(indexer cache.Indexer) VolumeAttachmentLister { return &volumeAttachmentLister{indexer: indexer} }
NewVolumeAttachmentLister returns a new VolumeAttachmentLister.
NewVolumeAttachmentLister
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/storage/v1beta1/volumeattachment.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/storage/v1beta1/volumeattachment.go
Apache-2.0
func (s *volumeAttachmentLister) List(selector labels.Selector) (ret []*v1beta1.VolumeAttachment, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.VolumeAttachment)) }) return ret, err }
List lists all VolumeAttachments in the indexer.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/storage/v1beta1/volumeattachment.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/storage/v1beta1/volumeattachment.go
Apache-2.0
func (s *volumeAttachmentLister) Get(name string) (*v1beta1.VolumeAttachment, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err } if !exists { return nil, errors.NewNotFound(v1beta1.Resource("volumeattachment"), name) } return obj.(*v1beta1.VolumeAttachment), nil }
Get retrieves the VolumeAttachment from the index for a given name.
Get
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/storage/v1beta1/volumeattachment.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/storage/v1beta1/volumeattachment.go
Apache-2.0
func NewCSIStorageCapacityLister(indexer cache.Indexer) CSIStorageCapacityLister { return &cSIStorageCapacityLister{indexer: indexer} }
NewCSIStorageCapacityLister returns a new CSIStorageCapacityLister.
NewCSIStorageCapacityLister
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/storage/v1beta1/csistoragecapacity.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/storage/v1beta1/csistoragecapacity.go
Apache-2.0
func (s *cSIStorageCapacityLister) List(selector labels.Selector) (ret []*v1beta1.CSIStorageCapacity, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.CSIStorageCapacity)) }) return ret, err }
List lists all CSIStorageCapacities in the indexer.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/storage/v1beta1/csistoragecapacity.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/storage/v1beta1/csistoragecapacity.go
Apache-2.0
func (s *cSIStorageCapacityLister) CSIStorageCapacities(namespace string) CSIStorageCapacityNamespaceLister { return cSIStorageCapacityNamespaceLister{indexer: s.indexer, namespace: namespace} }
CSIStorageCapacities returns an object that can list and get CSIStorageCapacities.
CSIStorageCapacities
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/storage/v1beta1/csistoragecapacity.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/storage/v1beta1/csistoragecapacity.go
Apache-2.0
func (s cSIStorageCapacityNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.CSIStorageCapacity, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.CSIStorageCapacity)) }) return ret, err }
List lists all CSIStorageCapacities in the indexer for a given namespace.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/storage/v1beta1/csistoragecapacity.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/storage/v1beta1/csistoragecapacity.go
Apache-2.0
func (s cSIStorageCapacityNamespaceLister) Get(name string) (*v1beta1.CSIStorageCapacity, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err } if !exists { return nil, errors.NewNotFound(v1beta1.Resource("csistoragecapacity"), name) } return obj.(*v1beta1.CSIStorageCapacity), nil }
Get retrieves the CSIStorageCapacity from the indexer for a given namespace and name.
Get
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/storage/v1beta1/csistoragecapacity.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/storage/v1beta1/csistoragecapacity.go
Apache-2.0
func NewCSIDriverLister(indexer cache.Indexer) CSIDriverLister { return &cSIDriverLister{indexer: indexer} }
NewCSIDriverLister returns a new CSIDriverLister.
NewCSIDriverLister
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/storage/v1beta1/csidriver.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/storage/v1beta1/csidriver.go
Apache-2.0
func (s *cSIDriverLister) List(selector labels.Selector) (ret []*v1beta1.CSIDriver, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.CSIDriver)) }) return ret, err }
List lists all CSIDrivers in the indexer.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/storage/v1beta1/csidriver.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/storage/v1beta1/csidriver.go
Apache-2.0
func (s *cSIDriverLister) Get(name string) (*v1beta1.CSIDriver, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err } if !exists { return nil, errors.NewNotFound(v1beta1.Resource("csidriver"), name) } return obj.(*v1beta1.CSIDriver), nil }
Get retrieves the CSIDriver from the index for a given name.
Get
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/storage/v1beta1/csidriver.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/storage/v1beta1/csidriver.go
Apache-2.0
func NewStorageClassLister(indexer cache.Indexer) StorageClassLister { return &storageClassLister{indexer: indexer} }
NewStorageClassLister returns a new StorageClassLister.
NewStorageClassLister
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/storage/v1beta1/storageclass.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/storage/v1beta1/storageclass.go
Apache-2.0
func (s *storageClassLister) List(selector labels.Selector) (ret []*v1beta1.StorageClass, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.StorageClass)) }) return ret, err }
List lists all StorageClasses in the indexer.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/storage/v1beta1/storageclass.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/storage/v1beta1/storageclass.go
Apache-2.0
func (s *storageClassLister) Get(name string) (*v1beta1.StorageClass, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err } if !exists { return nil, errors.NewNotFound(v1beta1.Resource("storageclass"), name) } return obj.(*v1beta1.StorageClass), nil }
Get retrieves the StorageClass from the index for a given name.
Get
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/storage/v1beta1/storageclass.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/storage/v1beta1/storageclass.go
Apache-2.0
func NewCSINodeLister(indexer cache.Indexer) CSINodeLister { return &cSINodeLister{indexer: indexer} }
NewCSINodeLister returns a new CSINodeLister.
NewCSINodeLister
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/storage/v1beta1/csinode.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/storage/v1beta1/csinode.go
Apache-2.0
func (s *cSINodeLister) List(selector labels.Selector) (ret []*v1beta1.CSINode, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1beta1.CSINode)) }) return ret, err }
List lists all CSINodes in the indexer.
List
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/storage/v1beta1/csinode.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/storage/v1beta1/csinode.go
Apache-2.0
func (s *cSINodeLister) Get(name string) (*v1beta1.CSINode, error) { obj, exists, err := s.indexer.GetByKey(name) if err != nil { return nil, err } if !exists { return nil, errors.NewNotFound(v1beta1.Resource("csinode"), name) } return obj.(*v1beta1.CSINode), nil }
Get retrieves the CSINode from the index for a given name.
Get
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/storage/v1beta1/csinode.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/storage/v1beta1/csinode.go
Apache-2.0
func NewVolumeAttachmentLister(indexer cache.Indexer) VolumeAttachmentLister { return &volumeAttachmentLister{indexer: indexer} }
NewVolumeAttachmentLister returns a new VolumeAttachmentLister.
NewVolumeAttachmentLister
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/listers/storage/v1/volumeattachment.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/listers/storage/v1/volumeattachment.go
Apache-2.0
End of preview. Expand in Data Studio

go Code Dataset (go-codesearch-dataset-openV2)

Dataset Description

This dataset contains go methods (functions) along with their documentation comments (typically # comments preceding the def line), extracted from various GitHub repositories. It follows a format similar to CodeSearchNet.

Features

The dataset includes the following features for each sample:

  • code: The go method's source code (from def to end).
  • docstring: The documentation comment associated with the method.
  • func_name: The name of the method (function).
  • language: The programming language (always "go").
  • repo: The full name of the source GitHub repository (e.g., rails/rails).
  • path: The relative file path within the source repository.
  • url: A GitHub URL pointing to the source file (usually on the master/main branch).
  • license: The SPDX identifier of the license declared for the source repository (e.g., MIT, Apache-2.0, go, or NO LICENSE).

Dataset Structure

The dataset is divided into the following splits:

  • train: 1,201,339 examples
  • validation: 121,618 examples
  • test: 102,574 examples

Total Examples: 1,425,531

Usage

You can load and use this dataset using the datasets library:

from datasets import load_dataset

# Load the dataset from the Hugging Face Hub
dataset = load_dataset("Shuu12121/go-codesearch-dataset-openV2")

# Access a specific split (e.g., training split)
train_data = dataset["train"]

# Explore the data
print(f"Number of training samples: {len(train_data):,}")
print("\nFirst training sample:")
print(train_data[0])

# Example: Access code and docstring of the first sample
first_sample = train_data[0]
print("\nMethod Name:", first_sample['func_name'])
print("\nDocstring:\n", first_sample['docstring'])
# print("\nCode Snippet:\n", first_sample['code'][:500] + "...") # Print first 500 chars of code

Data Collection

The data was collected by:

  1. Searching for popular and recent go repositories on GitHub.
  2. Cloning the repositories (shallow clone).
  3. Identifying go files (.go).
  4. Using the lizard tool to parse the code and identify method definitions.
  5. Extracting the method code and the preceding # comment lines as documentation.
  6. Filtering out methods without documentation or with very short code.
  7. Recording metadata like repository name, file path, and license.
  8. Splitting the data by repository (80% train, 10% validation, 10% test) to prevent data leakage between splits.

Licensing

The code snippets included in this dataset are sourced from various GitHub repositories under different licenses (MIT, Apache-2.0, go License, BSD clauses, etc.). Each data sample contains a license field indicating the license of the source repository. Users of this dataset should be aware of and respect the original licenses when using the code snippets. The dataset itself (the collection and organization) is provided under a permissive license, but the underlying code snippets retain their original licenses.

Disclaimer

This dataset was generated through an automated process. While efforts were made to accurately extract methods and documentation, there might be errors or inaccuracies.

Downloads last month
45