func()

in pkg/clientset/versioned/typed/networking/v1alpha3/fake/fake_destinationrule.gen.go [56:75]


func (c *FakeDestinationRules) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.DestinationRuleList, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewListAction(destinationrulesResource, destinationrulesKind, c.ns, opts), &v1alpha3.DestinationRuleList{})

	if obj == nil {
		return nil, err
	}

	label, _, _ := testing.ExtractFromListOptions(opts)
	if label == nil {
		label = labels.Everything()
	}
	list := &v1alpha3.DestinationRuleList{ListMeta: obj.(*v1alpha3.DestinationRuleList).ListMeta}
	for _, item := range obj.(*v1alpha3.DestinationRuleList).Items {
		if label.Matches(labels.Set(item.Labels)) {
			list.Items = append(list.Items, item)
		}
	}
	return list, err
}