mirror of https://github.com/knative/caching.git
Auto-update dependencies (#161)
Produced via: `dep ensure -update knative.dev/test-infra knative.dev/pkg` /assign n3wscott /cc n3wscott
This commit is contained in:
parent
fd1e5fef1c
commit
8777758dcc
|
@ -931,7 +931,7 @@
|
|||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:dcbc166f09bb3890df7a3fc5eb5181d8e6153d817884359c6787343046d140fb"
|
||||
digest = "1:f0466ac8909dad0b72cfd8ebd048d6005585df65cbdca891f61fde2844456fc0"
|
||||
name = "knative.dev/pkg"
|
||||
packages = [
|
||||
"apis",
|
||||
|
@ -950,7 +950,7 @@
|
|||
"metrics/metricskey",
|
||||
]
|
||||
pruneopts = "T"
|
||||
revision = "9d8b936ca0621af5762916bc899d4973363a2dc4"
|
||||
revision = "b26ddf762bc9232b297f77f9766e248dfb186aac"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
|
|
|
@ -138,15 +138,11 @@
|
|||
version = "v1.7.0"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:b38ab1b8cf42d089d9f31d4918c57c2dd47d42f3e7fc50e12142140228cf81a9"
|
||||
digest = "1:2b0e6c0bea11257c646616ebd6a62be0ef2b6a0fd8210ac3caeaf57ee136123b"
|
||||
name = "github.com/gogo/protobuf"
|
||||
packages = [
|
||||
"gogoproto",
|
||||
"jsonpb",
|
||||
"proto",
|
||||
"protoc-gen-gogo/descriptor",
|
||||
"sortkeys",
|
||||
"types",
|
||||
]
|
||||
pruneopts = "NUT"
|
||||
revision = "5628607bb4c51c3157aacc3a50f0ab707582b805"
|
||||
|
@ -860,30 +856,6 @@
|
|||
revision = "f221b8435cfb71e54062f6c6e99e9ade30b124d5"
|
||||
version = "v2.2.4"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:9579dd8b1ccd8cf54ed576af68438b69588cc136eac90b10aa7c8d1a1c8334ff"
|
||||
name = "istio.io/api"
|
||||
packages = ["networking/v1alpha3"]
|
||||
pruneopts = "NUT"
|
||||
revision = "e1a1952e5b81ed914b06c1814fd3a0c92c750e37"
|
||||
version = "1.4.1"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:57e8c0255e33ab72e09219665d5ed7733a694e0092ab4a69b97100aa27bcbbb4"
|
||||
name = "istio.io/client-go"
|
||||
packages = ["pkg/apis/networking/v1alpha3"]
|
||||
pruneopts = "NUT"
|
||||
revision = "26c62a04cdbc1fb52dd71a9194b0d49ce297e836"
|
||||
version = "1.4.1"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:9c9f11af1b1f2ae03d897ba5de27103ec1c9c43605663ccdef67831d6a462a30"
|
||||
name = "istio.io/gogo-genproto"
|
||||
packages = ["googleapis/google/api"]
|
||||
pruneopts = "NUT"
|
||||
revision = "f7d19ec0141d49ac9efc83b5e61fa81ba103b445"
|
||||
version = "1.4.0-beta.5"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:2b55f57d7b6d9f0f23478f2432b03273073f1bf93aed18620472e7117eb4451e"
|
||||
name = "k8s.io/api"
|
||||
|
@ -1374,8 +1346,6 @@
|
|||
"google.golang.org/api/option",
|
||||
"google.golang.org/grpc",
|
||||
"gopkg.in/yaml.v2",
|
||||
"istio.io/api/networking/v1alpha3",
|
||||
"istio.io/client-go/pkg/apis/networking/v1alpha3",
|
||||
"k8s.io/api/admission/v1beta1",
|
||||
"k8s.io/api/admissionregistration/v1beta1",
|
||||
"k8s.io/api/apps/v1",
|
||||
|
@ -1409,8 +1379,6 @@
|
|||
"k8s.io/apimachinery/pkg/util/wait",
|
||||
"k8s.io/apimachinery/pkg/version",
|
||||
"k8s.io/apimachinery/pkg/watch",
|
||||
"k8s.io/client-go/discovery",
|
||||
"k8s.io/client-go/discovery/fake",
|
||||
"k8s.io/client-go/dynamic",
|
||||
"k8s.io/client-go/dynamic/fake",
|
||||
"k8s.io/client-go/informers",
|
||||
|
@ -1437,7 +1405,6 @@
|
|||
"k8s.io/client-go/tools/clientcmd",
|
||||
"k8s.io/client-go/tools/metrics",
|
||||
"k8s.io/client-go/tools/record",
|
||||
"k8s.io/client-go/util/flowcontrol",
|
||||
"k8s.io/client-go/util/workqueue",
|
||||
"k8s.io/code-generator/cmd/client-gen",
|
||||
"k8s.io/code-generator/cmd/client-gen/generators/util",
|
||||
|
|
|
@ -14,8 +14,6 @@ required = [
|
|||
"knative.dev/test-infra/tools/dep-collector",
|
||||
"github.com/pkg/errors",
|
||||
"github.com/gogo/protobuf/proto",
|
||||
"istio.io/api/networking/v1alpha3",
|
||||
"istio.io/client-go/pkg/apis/networking/v1alpha3",
|
||||
]
|
||||
|
||||
[[constraint]]
|
||||
|
@ -42,14 +40,6 @@ required = [
|
|||
name = "github.com/gogo/protobuf"
|
||||
version = "v1.3.1"
|
||||
|
||||
[[constraint]]
|
||||
name = "istio.io/api"
|
||||
version = "1.4.1"
|
||||
|
||||
[[constraint]]
|
||||
name = "istio.io/client-go"
|
||||
version = "1.4.1"
|
||||
|
||||
[[override]]
|
||||
name = "gopkg.in/yaml.v2"
|
||||
version = "v2.2.4"
|
||||
|
|
|
@ -1,90 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package versioned
|
||||
|
||||
import (
|
||||
discovery "k8s.io/client-go/discovery"
|
||||
rest "k8s.io/client-go/rest"
|
||||
flowcontrol "k8s.io/client-go/util/flowcontrol"
|
||||
networkingv1alpha3 "knative.dev/pkg/client/istio/clientset/versioned/typed/networking/v1alpha3"
|
||||
)
|
||||
|
||||
type Interface interface {
|
||||
Discovery() discovery.DiscoveryInterface
|
||||
NetworkingV1alpha3() networkingv1alpha3.NetworkingV1alpha3Interface
|
||||
}
|
||||
|
||||
// Clientset contains the clients for groups. Each group has exactly one
|
||||
// version included in a Clientset.
|
||||
type Clientset struct {
|
||||
*discovery.DiscoveryClient
|
||||
networkingV1alpha3 *networkingv1alpha3.NetworkingV1alpha3Client
|
||||
}
|
||||
|
||||
// NetworkingV1alpha3 retrieves the NetworkingV1alpha3Client
|
||||
func (c *Clientset) NetworkingV1alpha3() networkingv1alpha3.NetworkingV1alpha3Interface {
|
||||
return c.networkingV1alpha3
|
||||
}
|
||||
|
||||
// Discovery retrieves the DiscoveryClient
|
||||
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.DiscoveryClient
|
||||
}
|
||||
|
||||
// NewForConfig creates a new Clientset for the given config.
|
||||
func NewForConfig(c *rest.Config) (*Clientset, error) {
|
||||
configShallowCopy := *c
|
||||
if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
|
||||
configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst)
|
||||
}
|
||||
var cs Clientset
|
||||
var err error
|
||||
cs.networkingV1alpha3, err = networkingv1alpha3.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &cs, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new Clientset for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *Clientset {
|
||||
var cs Clientset
|
||||
cs.networkingV1alpha3 = networkingv1alpha3.NewForConfigOrDie(c)
|
||||
|
||||
cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
|
||||
return &cs
|
||||
}
|
||||
|
||||
// New creates a new Clientset for the given RESTClient.
|
||||
func New(c rest.Interface) *Clientset {
|
||||
var cs Clientset
|
||||
cs.networkingV1alpha3 = networkingv1alpha3.New(c)
|
||||
|
||||
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
|
||||
return &cs
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated clientset.
|
||||
package versioned
|
82
vendor/knative.dev/pkg/client/istio/clientset/versioned/fake/clientset_generated.go
generated
vendored
82
vendor/knative.dev/pkg/client/istio/clientset/versioned/fake/clientset_generated.go
generated
vendored
|
@ -1,82 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
"k8s.io/client-go/discovery"
|
||||
fakediscovery "k8s.io/client-go/discovery/fake"
|
||||
"k8s.io/client-go/testing"
|
||||
clientset "knative.dev/pkg/client/istio/clientset/versioned"
|
||||
networkingv1alpha3 "knative.dev/pkg/client/istio/clientset/versioned/typed/networking/v1alpha3"
|
||||
fakenetworkingv1alpha3 "knative.dev/pkg/client/istio/clientset/versioned/typed/networking/v1alpha3/fake"
|
||||
)
|
||||
|
||||
// NewSimpleClientset returns a clientset that will respond with the provided objects.
|
||||
// It's backed by a very simple object tracker that processes creates, updates and deletions as-is,
|
||||
// without applying any validations and/or defaults. It shouldn't be considered a replacement
|
||||
// for a real clientset and is mostly useful in simple unit tests.
|
||||
func NewSimpleClientset(objects ...runtime.Object) *Clientset {
|
||||
o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder())
|
||||
for _, obj := range objects {
|
||||
if err := o.Add(obj); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
cs := &Clientset{tracker: o}
|
||||
cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake}
|
||||
cs.AddReactor("*", "*", testing.ObjectReaction(o))
|
||||
cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) {
|
||||
gvr := action.GetResource()
|
||||
ns := action.GetNamespace()
|
||||
watch, err := o.Watch(gvr, ns)
|
||||
if err != nil {
|
||||
return false, nil, err
|
||||
}
|
||||
return true, watch, nil
|
||||
})
|
||||
|
||||
return cs
|
||||
}
|
||||
|
||||
// Clientset implements clientset.Interface. Meant to be embedded into a
|
||||
// struct to get a default implementation. This makes faking out just the method
|
||||
// you want to test easier.
|
||||
type Clientset struct {
|
||||
testing.Fake
|
||||
discovery *fakediscovery.FakeDiscovery
|
||||
tracker testing.ObjectTracker
|
||||
}
|
||||
|
||||
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||
return c.discovery
|
||||
}
|
||||
|
||||
func (c *Clientset) Tracker() testing.ObjectTracker {
|
||||
return c.tracker
|
||||
}
|
||||
|
||||
var _ clientset.Interface = &Clientset{}
|
||||
|
||||
// NetworkingV1alpha3 retrieves the NetworkingV1alpha3Client
|
||||
func (c *Clientset) NetworkingV1alpha3() networkingv1alpha3.NetworkingV1alpha3Interface {
|
||||
return &fakenetworkingv1alpha3.FakeNetworkingV1alpha3{Fake: &c.Fake}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated fake clientset.
|
||||
package fake
|
|
@ -1,56 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
networkingv1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||
)
|
||||
|
||||
var scheme = runtime.NewScheme()
|
||||
var codecs = serializer.NewCodecFactory(scheme)
|
||||
var parameterCodec = runtime.NewParameterCodec(scheme)
|
||||
var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
networkingv1alpha3.AddToScheme,
|
||||
}
|
||||
|
||||
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
|
||||
// of clientsets, like in:
|
||||
//
|
||||
// import (
|
||||
// "k8s.io/client-go/kubernetes"
|
||||
// clientsetscheme "k8s.io/client-go/kubernetes/scheme"
|
||||
// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
|
||||
// )
|
||||
//
|
||||
// kclientset, _ := kubernetes.NewForConfig(c)
|
||||
// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
|
||||
//
|
||||
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
|
||||
// correctly.
|
||||
var AddToScheme = localSchemeBuilder.AddToScheme
|
||||
|
||||
func init() {
|
||||
v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"})
|
||||
utilruntime.Must(AddToScheme(scheme))
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package contains the scheme of the automatically generated clientset.
|
||||
package scheme
|
|
@ -1,56 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package scheme
|
||||
|
||||
import (
|
||||
networkingv1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||
)
|
||||
|
||||
var Scheme = runtime.NewScheme()
|
||||
var Codecs = serializer.NewCodecFactory(Scheme)
|
||||
var ParameterCodec = runtime.NewParameterCodec(Scheme)
|
||||
var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
networkingv1alpha3.AddToScheme,
|
||||
}
|
||||
|
||||
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
|
||||
// of clientsets, like in:
|
||||
//
|
||||
// import (
|
||||
// "k8s.io/client-go/kubernetes"
|
||||
// clientsetscheme "k8s.io/client-go/kubernetes/scheme"
|
||||
// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
|
||||
// )
|
||||
//
|
||||
// kclientset, _ := kubernetes.NewForConfig(c)
|
||||
// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
|
||||
//
|
||||
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
|
||||
// correctly.
|
||||
var AddToScheme = localSchemeBuilder.AddToScheme
|
||||
|
||||
func init() {
|
||||
v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"})
|
||||
utilruntime.Must(AddToScheme(Scheme))
|
||||
}
|
|
@ -1,174 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
scheme "knative.dev/pkg/client/istio/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// DestinationRulesGetter has a method to return a DestinationRuleInterface.
|
||||
// A group's client should implement this interface.
|
||||
type DestinationRulesGetter interface {
|
||||
DestinationRules(namespace string) DestinationRuleInterface
|
||||
}
|
||||
|
||||
// DestinationRuleInterface has methods to work with DestinationRule resources.
|
||||
type DestinationRuleInterface interface {
|
||||
Create(*v1alpha3.DestinationRule) (*v1alpha3.DestinationRule, error)
|
||||
Update(*v1alpha3.DestinationRule) (*v1alpha3.DestinationRule, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v1alpha3.DestinationRule, error)
|
||||
List(opts v1.ListOptions) (*v1alpha3.DestinationRuleList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.DestinationRule, err error)
|
||||
DestinationRuleExpansion
|
||||
}
|
||||
|
||||
// destinationRules implements DestinationRuleInterface
|
||||
type destinationRules struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newDestinationRules returns a DestinationRules
|
||||
func newDestinationRules(c *NetworkingV1alpha3Client, namespace string) *destinationRules {
|
||||
return &destinationRules{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the destinationRule, and returns the corresponding destinationRule object, and an error if there is any.
|
||||
func (c *destinationRules) Get(name string, options v1.GetOptions) (result *v1alpha3.DestinationRule, err error) {
|
||||
result = &v1alpha3.DestinationRule{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("destinationrules").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of DestinationRules that match those selectors.
|
||||
func (c *destinationRules) List(opts v1.ListOptions) (result *v1alpha3.DestinationRuleList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha3.DestinationRuleList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("destinationrules").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested destinationRules.
|
||||
func (c *destinationRules) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("destinationrules").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a destinationRule and creates it. Returns the server's representation of the destinationRule, and an error, if there is any.
|
||||
func (c *destinationRules) Create(destinationRule *v1alpha3.DestinationRule) (result *v1alpha3.DestinationRule, err error) {
|
||||
result = &v1alpha3.DestinationRule{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("destinationrules").
|
||||
Body(destinationRule).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a destinationRule and updates it. Returns the server's representation of the destinationRule, and an error, if there is any.
|
||||
func (c *destinationRules) Update(destinationRule *v1alpha3.DestinationRule) (result *v1alpha3.DestinationRule, err error) {
|
||||
result = &v1alpha3.DestinationRule{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("destinationrules").
|
||||
Name(destinationRule.Name).
|
||||
Body(destinationRule).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the destinationRule and deletes it. Returns an error if one occurs.
|
||||
func (c *destinationRules) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("destinationrules").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *destinationRules) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("destinationrules").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched destinationRule.
|
||||
func (c *destinationRules) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.DestinationRule, err error) {
|
||||
result = &v1alpha3.DestinationRule{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("destinationrules").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
20
vendor/knative.dev/pkg/client/istio/clientset/versioned/typed/networking/v1alpha3/doc.go
generated
vendored
20
vendor/knative.dev/pkg/client/istio/clientset/versioned/typed/networking/v1alpha3/doc.go
generated
vendored
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1alpha3
|
|
@ -1,174 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
scheme "knative.dev/pkg/client/istio/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// EnvoyFiltersGetter has a method to return a EnvoyFilterInterface.
|
||||
// A group's client should implement this interface.
|
||||
type EnvoyFiltersGetter interface {
|
||||
EnvoyFilters(namespace string) EnvoyFilterInterface
|
||||
}
|
||||
|
||||
// EnvoyFilterInterface has methods to work with EnvoyFilter resources.
|
||||
type EnvoyFilterInterface interface {
|
||||
Create(*v1alpha3.EnvoyFilter) (*v1alpha3.EnvoyFilter, error)
|
||||
Update(*v1alpha3.EnvoyFilter) (*v1alpha3.EnvoyFilter, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v1alpha3.EnvoyFilter, error)
|
||||
List(opts v1.ListOptions) (*v1alpha3.EnvoyFilterList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.EnvoyFilter, err error)
|
||||
EnvoyFilterExpansion
|
||||
}
|
||||
|
||||
// envoyFilters implements EnvoyFilterInterface
|
||||
type envoyFilters struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newEnvoyFilters returns a EnvoyFilters
|
||||
func newEnvoyFilters(c *NetworkingV1alpha3Client, namespace string) *envoyFilters {
|
||||
return &envoyFilters{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the envoyFilter, and returns the corresponding envoyFilter object, and an error if there is any.
|
||||
func (c *envoyFilters) Get(name string, options v1.GetOptions) (result *v1alpha3.EnvoyFilter, err error) {
|
||||
result = &v1alpha3.EnvoyFilter{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("envoyfilters").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of EnvoyFilters that match those selectors.
|
||||
func (c *envoyFilters) List(opts v1.ListOptions) (result *v1alpha3.EnvoyFilterList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha3.EnvoyFilterList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("envoyfilters").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested envoyFilters.
|
||||
func (c *envoyFilters) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("envoyfilters").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a envoyFilter and creates it. Returns the server's representation of the envoyFilter, and an error, if there is any.
|
||||
func (c *envoyFilters) Create(envoyFilter *v1alpha3.EnvoyFilter) (result *v1alpha3.EnvoyFilter, err error) {
|
||||
result = &v1alpha3.EnvoyFilter{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("envoyfilters").
|
||||
Body(envoyFilter).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a envoyFilter and updates it. Returns the server's representation of the envoyFilter, and an error, if there is any.
|
||||
func (c *envoyFilters) Update(envoyFilter *v1alpha3.EnvoyFilter) (result *v1alpha3.EnvoyFilter, err error) {
|
||||
result = &v1alpha3.EnvoyFilter{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("envoyfilters").
|
||||
Name(envoyFilter.Name).
|
||||
Body(envoyFilter).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the envoyFilter and deletes it. Returns an error if one occurs.
|
||||
func (c *envoyFilters) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("envoyfilters").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *envoyFilters) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("envoyfilters").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched envoyFilter.
|
||||
func (c *envoyFilters) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.EnvoyFilter, err error) {
|
||||
result = &v1alpha3.EnvoyFilter{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("envoyfilters").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
|
@ -1,128 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeDestinationRules implements DestinationRuleInterface
|
||||
type FakeDestinationRules struct {
|
||||
Fake *FakeNetworkingV1alpha3
|
||||
ns string
|
||||
}
|
||||
|
||||
var destinationrulesResource = schema.GroupVersionResource{Group: "networking.istio.io", Version: "v1alpha3", Resource: "destinationrules"}
|
||||
|
||||
var destinationrulesKind = schema.GroupVersionKind{Group: "networking.istio.io", Version: "v1alpha3", Kind: "DestinationRule"}
|
||||
|
||||
// Get takes name of the destinationRule, and returns the corresponding destinationRule object, and an error if there is any.
|
||||
func (c *FakeDestinationRules) Get(name string, options v1.GetOptions) (result *v1alpha3.DestinationRule, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(destinationrulesResource, c.ns, name), &v1alpha3.DestinationRule{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha3.DestinationRule), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of DestinationRules that match those selectors.
|
||||
func (c *FakeDestinationRules) List(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
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested destinationRules.
|
||||
func (c *FakeDestinationRules) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(destinationrulesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a destinationRule and creates it. Returns the server's representation of the destinationRule, and an error, if there is any.
|
||||
func (c *FakeDestinationRules) Create(destinationRule *v1alpha3.DestinationRule) (result *v1alpha3.DestinationRule, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(destinationrulesResource, c.ns, destinationRule), &v1alpha3.DestinationRule{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha3.DestinationRule), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a destinationRule and updates it. Returns the server's representation of the destinationRule, and an error, if there is any.
|
||||
func (c *FakeDestinationRules) Update(destinationRule *v1alpha3.DestinationRule) (result *v1alpha3.DestinationRule, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(destinationrulesResource, c.ns, destinationRule), &v1alpha3.DestinationRule{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha3.DestinationRule), err
|
||||
}
|
||||
|
||||
// Delete takes name of the destinationRule and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeDestinationRules) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(destinationrulesResource, c.ns, name), &v1alpha3.DestinationRule{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeDestinationRules) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(destinationrulesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha3.DestinationRuleList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched destinationRule.
|
||||
func (c *FakeDestinationRules) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.DestinationRule, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(destinationrulesResource, c.ns, name, pt, data, subresources...), &v1alpha3.DestinationRule{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha3.DestinationRule), err
|
||||
}
|
|
@ -1,128 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeEnvoyFilters implements EnvoyFilterInterface
|
||||
type FakeEnvoyFilters struct {
|
||||
Fake *FakeNetworkingV1alpha3
|
||||
ns string
|
||||
}
|
||||
|
||||
var envoyfiltersResource = schema.GroupVersionResource{Group: "networking.istio.io", Version: "v1alpha3", Resource: "envoyfilters"}
|
||||
|
||||
var envoyfiltersKind = schema.GroupVersionKind{Group: "networking.istio.io", Version: "v1alpha3", Kind: "EnvoyFilter"}
|
||||
|
||||
// Get takes name of the envoyFilter, and returns the corresponding envoyFilter object, and an error if there is any.
|
||||
func (c *FakeEnvoyFilters) Get(name string, options v1.GetOptions) (result *v1alpha3.EnvoyFilter, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(envoyfiltersResource, c.ns, name), &v1alpha3.EnvoyFilter{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha3.EnvoyFilter), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of EnvoyFilters that match those selectors.
|
||||
func (c *FakeEnvoyFilters) List(opts v1.ListOptions) (result *v1alpha3.EnvoyFilterList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(envoyfiltersResource, envoyfiltersKind, c.ns, opts), &v1alpha3.EnvoyFilterList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha3.EnvoyFilterList{ListMeta: obj.(*v1alpha3.EnvoyFilterList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha3.EnvoyFilterList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested envoyFilters.
|
||||
func (c *FakeEnvoyFilters) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(envoyfiltersResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a envoyFilter and creates it. Returns the server's representation of the envoyFilter, and an error, if there is any.
|
||||
func (c *FakeEnvoyFilters) Create(envoyFilter *v1alpha3.EnvoyFilter) (result *v1alpha3.EnvoyFilter, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(envoyfiltersResource, c.ns, envoyFilter), &v1alpha3.EnvoyFilter{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha3.EnvoyFilter), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a envoyFilter and updates it. Returns the server's representation of the envoyFilter, and an error, if there is any.
|
||||
func (c *FakeEnvoyFilters) Update(envoyFilter *v1alpha3.EnvoyFilter) (result *v1alpha3.EnvoyFilter, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(envoyfiltersResource, c.ns, envoyFilter), &v1alpha3.EnvoyFilter{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha3.EnvoyFilter), err
|
||||
}
|
||||
|
||||
// Delete takes name of the envoyFilter and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeEnvoyFilters) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(envoyfiltersResource, c.ns, name), &v1alpha3.EnvoyFilter{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeEnvoyFilters) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(envoyfiltersResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha3.EnvoyFilterList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched envoyFilter.
|
||||
func (c *FakeEnvoyFilters) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.EnvoyFilter, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(envoyfiltersResource, c.ns, name, pt, data, subresources...), &v1alpha3.EnvoyFilter{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha3.EnvoyFilter), err
|
||||
}
|
|
@ -1,128 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeGateways implements GatewayInterface
|
||||
type FakeGateways struct {
|
||||
Fake *FakeNetworkingV1alpha3
|
||||
ns string
|
||||
}
|
||||
|
||||
var gatewaysResource = schema.GroupVersionResource{Group: "networking.istio.io", Version: "v1alpha3", Resource: "gateways"}
|
||||
|
||||
var gatewaysKind = schema.GroupVersionKind{Group: "networking.istio.io", Version: "v1alpha3", Kind: "Gateway"}
|
||||
|
||||
// Get takes name of the gateway, and returns the corresponding gateway object, and an error if there is any.
|
||||
func (c *FakeGateways) Get(name string, options v1.GetOptions) (result *v1alpha3.Gateway, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(gatewaysResource, c.ns, name), &v1alpha3.Gateway{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha3.Gateway), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Gateways that match those selectors.
|
||||
func (c *FakeGateways) List(opts v1.ListOptions) (result *v1alpha3.GatewayList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(gatewaysResource, gatewaysKind, c.ns, opts), &v1alpha3.GatewayList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha3.GatewayList{ListMeta: obj.(*v1alpha3.GatewayList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha3.GatewayList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested gateways.
|
||||
func (c *FakeGateways) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(gatewaysResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a gateway and creates it. Returns the server's representation of the gateway, and an error, if there is any.
|
||||
func (c *FakeGateways) Create(gateway *v1alpha3.Gateway) (result *v1alpha3.Gateway, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(gatewaysResource, c.ns, gateway), &v1alpha3.Gateway{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha3.Gateway), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a gateway and updates it. Returns the server's representation of the gateway, and an error, if there is any.
|
||||
func (c *FakeGateways) Update(gateway *v1alpha3.Gateway) (result *v1alpha3.Gateway, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(gatewaysResource, c.ns, gateway), &v1alpha3.Gateway{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha3.Gateway), err
|
||||
}
|
||||
|
||||
// Delete takes name of the gateway and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeGateways) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(gatewaysResource, c.ns, name), &v1alpha3.Gateway{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeGateways) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(gatewaysResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha3.GatewayList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched gateway.
|
||||
func (c *FakeGateways) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.Gateway, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(gatewaysResource, c.ns, name, pt, data, subresources...), &v1alpha3.Gateway{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha3.Gateway), err
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
rest "k8s.io/client-go/rest"
|
||||
testing "k8s.io/client-go/testing"
|
||||
v1alpha3 "knative.dev/pkg/client/istio/clientset/versioned/typed/networking/v1alpha3"
|
||||
)
|
||||
|
||||
type FakeNetworkingV1alpha3 struct {
|
||||
*testing.Fake
|
||||
}
|
||||
|
||||
func (c *FakeNetworkingV1alpha3) DestinationRules(namespace string) v1alpha3.DestinationRuleInterface {
|
||||
return &FakeDestinationRules{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeNetworkingV1alpha3) EnvoyFilters(namespace string) v1alpha3.EnvoyFilterInterface {
|
||||
return &FakeEnvoyFilters{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeNetworkingV1alpha3) Gateways(namespace string) v1alpha3.GatewayInterface {
|
||||
return &FakeGateways{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeNetworkingV1alpha3) ServiceEntries(namespace string) v1alpha3.ServiceEntryInterface {
|
||||
return &FakeServiceEntries{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeNetworkingV1alpha3) Sidecars(namespace string) v1alpha3.SidecarInterface {
|
||||
return &FakeSidecars{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeNetworkingV1alpha3) VirtualServices(namespace string) v1alpha3.VirtualServiceInterface {
|
||||
return &FakeVirtualServices{c, namespace}
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeNetworkingV1alpha3) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
|
@ -1,128 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeServiceEntries implements ServiceEntryInterface
|
||||
type FakeServiceEntries struct {
|
||||
Fake *FakeNetworkingV1alpha3
|
||||
ns string
|
||||
}
|
||||
|
||||
var serviceentriesResource = schema.GroupVersionResource{Group: "networking.istio.io", Version: "v1alpha3", Resource: "serviceentries"}
|
||||
|
||||
var serviceentriesKind = schema.GroupVersionKind{Group: "networking.istio.io", Version: "v1alpha3", Kind: "ServiceEntry"}
|
||||
|
||||
// Get takes name of the serviceEntry, and returns the corresponding serviceEntry object, and an error if there is any.
|
||||
func (c *FakeServiceEntries) Get(name string, options v1.GetOptions) (result *v1alpha3.ServiceEntry, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(serviceentriesResource, c.ns, name), &v1alpha3.ServiceEntry{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha3.ServiceEntry), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ServiceEntries that match those selectors.
|
||||
func (c *FakeServiceEntries) List(opts v1.ListOptions) (result *v1alpha3.ServiceEntryList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(serviceentriesResource, serviceentriesKind, c.ns, opts), &v1alpha3.ServiceEntryList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha3.ServiceEntryList{ListMeta: obj.(*v1alpha3.ServiceEntryList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha3.ServiceEntryList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested serviceEntries.
|
||||
func (c *FakeServiceEntries) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(serviceentriesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a serviceEntry and creates it. Returns the server's representation of the serviceEntry, and an error, if there is any.
|
||||
func (c *FakeServiceEntries) Create(serviceEntry *v1alpha3.ServiceEntry) (result *v1alpha3.ServiceEntry, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(serviceentriesResource, c.ns, serviceEntry), &v1alpha3.ServiceEntry{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha3.ServiceEntry), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a serviceEntry and updates it. Returns the server's representation of the serviceEntry, and an error, if there is any.
|
||||
func (c *FakeServiceEntries) Update(serviceEntry *v1alpha3.ServiceEntry) (result *v1alpha3.ServiceEntry, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(serviceentriesResource, c.ns, serviceEntry), &v1alpha3.ServiceEntry{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha3.ServiceEntry), err
|
||||
}
|
||||
|
||||
// Delete takes name of the serviceEntry and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeServiceEntries) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(serviceentriesResource, c.ns, name), &v1alpha3.ServiceEntry{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeServiceEntries) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(serviceentriesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha3.ServiceEntryList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched serviceEntry.
|
||||
func (c *FakeServiceEntries) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.ServiceEntry, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(serviceentriesResource, c.ns, name, pt, data, subresources...), &v1alpha3.ServiceEntry{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha3.ServiceEntry), err
|
||||
}
|
|
@ -1,128 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeSidecars implements SidecarInterface
|
||||
type FakeSidecars struct {
|
||||
Fake *FakeNetworkingV1alpha3
|
||||
ns string
|
||||
}
|
||||
|
||||
var sidecarsResource = schema.GroupVersionResource{Group: "networking.istio.io", Version: "v1alpha3", Resource: "sidecars"}
|
||||
|
||||
var sidecarsKind = schema.GroupVersionKind{Group: "networking.istio.io", Version: "v1alpha3", Kind: "Sidecar"}
|
||||
|
||||
// Get takes name of the sidecar, and returns the corresponding sidecar object, and an error if there is any.
|
||||
func (c *FakeSidecars) Get(name string, options v1.GetOptions) (result *v1alpha3.Sidecar, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(sidecarsResource, c.ns, name), &v1alpha3.Sidecar{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha3.Sidecar), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Sidecars that match those selectors.
|
||||
func (c *FakeSidecars) List(opts v1.ListOptions) (result *v1alpha3.SidecarList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(sidecarsResource, sidecarsKind, c.ns, opts), &v1alpha3.SidecarList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha3.SidecarList{ListMeta: obj.(*v1alpha3.SidecarList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha3.SidecarList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested sidecars.
|
||||
func (c *FakeSidecars) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(sidecarsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a sidecar and creates it. Returns the server's representation of the sidecar, and an error, if there is any.
|
||||
func (c *FakeSidecars) Create(sidecar *v1alpha3.Sidecar) (result *v1alpha3.Sidecar, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(sidecarsResource, c.ns, sidecar), &v1alpha3.Sidecar{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha3.Sidecar), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a sidecar and updates it. Returns the server's representation of the sidecar, and an error, if there is any.
|
||||
func (c *FakeSidecars) Update(sidecar *v1alpha3.Sidecar) (result *v1alpha3.Sidecar, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(sidecarsResource, c.ns, sidecar), &v1alpha3.Sidecar{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha3.Sidecar), err
|
||||
}
|
||||
|
||||
// Delete takes name of the sidecar and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeSidecars) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(sidecarsResource, c.ns, name), &v1alpha3.Sidecar{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeSidecars) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(sidecarsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha3.SidecarList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched sidecar.
|
||||
func (c *FakeSidecars) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.Sidecar, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(sidecarsResource, c.ns, name, pt, data, subresources...), &v1alpha3.Sidecar{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha3.Sidecar), err
|
||||
}
|
|
@ -1,128 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeVirtualServices implements VirtualServiceInterface
|
||||
type FakeVirtualServices struct {
|
||||
Fake *FakeNetworkingV1alpha3
|
||||
ns string
|
||||
}
|
||||
|
||||
var virtualservicesResource = schema.GroupVersionResource{Group: "networking.istio.io", Version: "v1alpha3", Resource: "virtualservices"}
|
||||
|
||||
var virtualservicesKind = schema.GroupVersionKind{Group: "networking.istio.io", Version: "v1alpha3", Kind: "VirtualService"}
|
||||
|
||||
// Get takes name of the virtualService, and returns the corresponding virtualService object, and an error if there is any.
|
||||
func (c *FakeVirtualServices) Get(name string, options v1.GetOptions) (result *v1alpha3.VirtualService, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(virtualservicesResource, c.ns, name), &v1alpha3.VirtualService{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha3.VirtualService), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of VirtualServices that match those selectors.
|
||||
func (c *FakeVirtualServices) List(opts v1.ListOptions) (result *v1alpha3.VirtualServiceList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(virtualservicesResource, virtualservicesKind, c.ns, opts), &v1alpha3.VirtualServiceList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha3.VirtualServiceList{ListMeta: obj.(*v1alpha3.VirtualServiceList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha3.VirtualServiceList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested virtualServices.
|
||||
func (c *FakeVirtualServices) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(virtualservicesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a virtualService and creates it. Returns the server's representation of the virtualService, and an error, if there is any.
|
||||
func (c *FakeVirtualServices) Create(virtualService *v1alpha3.VirtualService) (result *v1alpha3.VirtualService, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(virtualservicesResource, c.ns, virtualService), &v1alpha3.VirtualService{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha3.VirtualService), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a virtualService and updates it. Returns the server's representation of the virtualService, and an error, if there is any.
|
||||
func (c *FakeVirtualServices) Update(virtualService *v1alpha3.VirtualService) (result *v1alpha3.VirtualService, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(virtualservicesResource, c.ns, virtualService), &v1alpha3.VirtualService{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha3.VirtualService), err
|
||||
}
|
||||
|
||||
// Delete takes name of the virtualService and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeVirtualServices) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(virtualservicesResource, c.ns, name), &v1alpha3.VirtualService{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeVirtualServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(virtualservicesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha3.VirtualServiceList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched virtualService.
|
||||
func (c *FakeVirtualServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.VirtualService, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(virtualservicesResource, c.ns, name, pt, data, subresources...), &v1alpha3.VirtualService{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha3.VirtualService), err
|
||||
}
|
174
vendor/knative.dev/pkg/client/istio/clientset/versioned/typed/networking/v1alpha3/gateway.go
generated
vendored
174
vendor/knative.dev/pkg/client/istio/clientset/versioned/typed/networking/v1alpha3/gateway.go
generated
vendored
|
@ -1,174 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
scheme "knative.dev/pkg/client/istio/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// GatewaysGetter has a method to return a GatewayInterface.
|
||||
// A group's client should implement this interface.
|
||||
type GatewaysGetter interface {
|
||||
Gateways(namespace string) GatewayInterface
|
||||
}
|
||||
|
||||
// GatewayInterface has methods to work with Gateway resources.
|
||||
type GatewayInterface interface {
|
||||
Create(*v1alpha3.Gateway) (*v1alpha3.Gateway, error)
|
||||
Update(*v1alpha3.Gateway) (*v1alpha3.Gateway, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v1alpha3.Gateway, error)
|
||||
List(opts v1.ListOptions) (*v1alpha3.GatewayList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.Gateway, err error)
|
||||
GatewayExpansion
|
||||
}
|
||||
|
||||
// gateways implements GatewayInterface
|
||||
type gateways struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newGateways returns a Gateways
|
||||
func newGateways(c *NetworkingV1alpha3Client, namespace string) *gateways {
|
||||
return &gateways{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the gateway, and returns the corresponding gateway object, and an error if there is any.
|
||||
func (c *gateways) Get(name string, options v1.GetOptions) (result *v1alpha3.Gateway, err error) {
|
||||
result = &v1alpha3.Gateway{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("gateways").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Gateways that match those selectors.
|
||||
func (c *gateways) List(opts v1.ListOptions) (result *v1alpha3.GatewayList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha3.GatewayList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("gateways").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested gateways.
|
||||
func (c *gateways) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("gateways").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a gateway and creates it. Returns the server's representation of the gateway, and an error, if there is any.
|
||||
func (c *gateways) Create(gateway *v1alpha3.Gateway) (result *v1alpha3.Gateway, err error) {
|
||||
result = &v1alpha3.Gateway{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("gateways").
|
||||
Body(gateway).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a gateway and updates it. Returns the server's representation of the gateway, and an error, if there is any.
|
||||
func (c *gateways) Update(gateway *v1alpha3.Gateway) (result *v1alpha3.Gateway, err error) {
|
||||
result = &v1alpha3.Gateway{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("gateways").
|
||||
Name(gateway.Name).
|
||||
Body(gateway).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the gateway and deletes it. Returns an error if one occurs.
|
||||
func (c *gateways) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("gateways").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *gateways) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("gateways").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched gateway.
|
||||
func (c *gateways) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.Gateway, err error) {
|
||||
result = &v1alpha3.Gateway{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("gateways").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
type DestinationRuleExpansion interface{}
|
||||
|
||||
type EnvoyFilterExpansion interface{}
|
||||
|
||||
type GatewayExpansion interface{}
|
||||
|
||||
type ServiceEntryExpansion interface{}
|
||||
|
||||
type SidecarExpansion interface{}
|
||||
|
||||
type VirtualServiceExpansion interface{}
|
|
@ -1,114 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
rest "k8s.io/client-go/rest"
|
||||
"knative.dev/pkg/client/istio/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
type NetworkingV1alpha3Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
DestinationRulesGetter
|
||||
EnvoyFiltersGetter
|
||||
GatewaysGetter
|
||||
ServiceEntriesGetter
|
||||
SidecarsGetter
|
||||
VirtualServicesGetter
|
||||
}
|
||||
|
||||
// NetworkingV1alpha3Client is used to interact with features provided by the networking.istio.io group.
|
||||
type NetworkingV1alpha3Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *NetworkingV1alpha3Client) DestinationRules(namespace string) DestinationRuleInterface {
|
||||
return newDestinationRules(c, namespace)
|
||||
}
|
||||
|
||||
func (c *NetworkingV1alpha3Client) EnvoyFilters(namespace string) EnvoyFilterInterface {
|
||||
return newEnvoyFilters(c, namespace)
|
||||
}
|
||||
|
||||
func (c *NetworkingV1alpha3Client) Gateways(namespace string) GatewayInterface {
|
||||
return newGateways(c, namespace)
|
||||
}
|
||||
|
||||
func (c *NetworkingV1alpha3Client) ServiceEntries(namespace string) ServiceEntryInterface {
|
||||
return newServiceEntries(c, namespace)
|
||||
}
|
||||
|
||||
func (c *NetworkingV1alpha3Client) Sidecars(namespace string) SidecarInterface {
|
||||
return newSidecars(c, namespace)
|
||||
}
|
||||
|
||||
func (c *NetworkingV1alpha3Client) VirtualServices(namespace string) VirtualServiceInterface {
|
||||
return newVirtualServices(c, namespace)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new NetworkingV1alpha3Client for the given config.
|
||||
func NewForConfig(c *rest.Config) (*NetworkingV1alpha3Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client, err := rest.RESTClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &NetworkingV1alpha3Client{client}, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new NetworkingV1alpha3Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *NetworkingV1alpha3Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return client
|
||||
}
|
||||
|
||||
// New creates a new NetworkingV1alpha3Client for the given RESTClient.
|
||||
func New(c rest.Interface) *NetworkingV1alpha3Client {
|
||||
return &NetworkingV1alpha3Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1alpha3.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *NetworkingV1alpha3Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.restClient
|
||||
}
|
|
@ -1,174 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
scheme "knative.dev/pkg/client/istio/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// ServiceEntriesGetter has a method to return a ServiceEntryInterface.
|
||||
// A group's client should implement this interface.
|
||||
type ServiceEntriesGetter interface {
|
||||
ServiceEntries(namespace string) ServiceEntryInterface
|
||||
}
|
||||
|
||||
// ServiceEntryInterface has methods to work with ServiceEntry resources.
|
||||
type ServiceEntryInterface interface {
|
||||
Create(*v1alpha3.ServiceEntry) (*v1alpha3.ServiceEntry, error)
|
||||
Update(*v1alpha3.ServiceEntry) (*v1alpha3.ServiceEntry, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v1alpha3.ServiceEntry, error)
|
||||
List(opts v1.ListOptions) (*v1alpha3.ServiceEntryList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.ServiceEntry, err error)
|
||||
ServiceEntryExpansion
|
||||
}
|
||||
|
||||
// serviceEntries implements ServiceEntryInterface
|
||||
type serviceEntries struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newServiceEntries returns a ServiceEntries
|
||||
func newServiceEntries(c *NetworkingV1alpha3Client, namespace string) *serviceEntries {
|
||||
return &serviceEntries{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the serviceEntry, and returns the corresponding serviceEntry object, and an error if there is any.
|
||||
func (c *serviceEntries) Get(name string, options v1.GetOptions) (result *v1alpha3.ServiceEntry, err error) {
|
||||
result = &v1alpha3.ServiceEntry{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("serviceentries").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ServiceEntries that match those selectors.
|
||||
func (c *serviceEntries) List(opts v1.ListOptions) (result *v1alpha3.ServiceEntryList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha3.ServiceEntryList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("serviceentries").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested serviceEntries.
|
||||
func (c *serviceEntries) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("serviceentries").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a serviceEntry and creates it. Returns the server's representation of the serviceEntry, and an error, if there is any.
|
||||
func (c *serviceEntries) Create(serviceEntry *v1alpha3.ServiceEntry) (result *v1alpha3.ServiceEntry, err error) {
|
||||
result = &v1alpha3.ServiceEntry{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("serviceentries").
|
||||
Body(serviceEntry).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a serviceEntry and updates it. Returns the server's representation of the serviceEntry, and an error, if there is any.
|
||||
func (c *serviceEntries) Update(serviceEntry *v1alpha3.ServiceEntry) (result *v1alpha3.ServiceEntry, err error) {
|
||||
result = &v1alpha3.ServiceEntry{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("serviceentries").
|
||||
Name(serviceEntry.Name).
|
||||
Body(serviceEntry).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the serviceEntry and deletes it. Returns an error if one occurs.
|
||||
func (c *serviceEntries) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("serviceentries").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *serviceEntries) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("serviceentries").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched serviceEntry.
|
||||
func (c *serviceEntries) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.ServiceEntry, err error) {
|
||||
result = &v1alpha3.ServiceEntry{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("serviceentries").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
174
vendor/knative.dev/pkg/client/istio/clientset/versioned/typed/networking/v1alpha3/sidecar.go
generated
vendored
174
vendor/knative.dev/pkg/client/istio/clientset/versioned/typed/networking/v1alpha3/sidecar.go
generated
vendored
|
@ -1,174 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
scheme "knative.dev/pkg/client/istio/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// SidecarsGetter has a method to return a SidecarInterface.
|
||||
// A group's client should implement this interface.
|
||||
type SidecarsGetter interface {
|
||||
Sidecars(namespace string) SidecarInterface
|
||||
}
|
||||
|
||||
// SidecarInterface has methods to work with Sidecar resources.
|
||||
type SidecarInterface interface {
|
||||
Create(*v1alpha3.Sidecar) (*v1alpha3.Sidecar, error)
|
||||
Update(*v1alpha3.Sidecar) (*v1alpha3.Sidecar, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v1alpha3.Sidecar, error)
|
||||
List(opts v1.ListOptions) (*v1alpha3.SidecarList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.Sidecar, err error)
|
||||
SidecarExpansion
|
||||
}
|
||||
|
||||
// sidecars implements SidecarInterface
|
||||
type sidecars struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newSidecars returns a Sidecars
|
||||
func newSidecars(c *NetworkingV1alpha3Client, namespace string) *sidecars {
|
||||
return &sidecars{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the sidecar, and returns the corresponding sidecar object, and an error if there is any.
|
||||
func (c *sidecars) Get(name string, options v1.GetOptions) (result *v1alpha3.Sidecar, err error) {
|
||||
result = &v1alpha3.Sidecar{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("sidecars").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Sidecars that match those selectors.
|
||||
func (c *sidecars) List(opts v1.ListOptions) (result *v1alpha3.SidecarList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha3.SidecarList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("sidecars").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested sidecars.
|
||||
func (c *sidecars) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("sidecars").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a sidecar and creates it. Returns the server's representation of the sidecar, and an error, if there is any.
|
||||
func (c *sidecars) Create(sidecar *v1alpha3.Sidecar) (result *v1alpha3.Sidecar, err error) {
|
||||
result = &v1alpha3.Sidecar{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("sidecars").
|
||||
Body(sidecar).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a sidecar and updates it. Returns the server's representation of the sidecar, and an error, if there is any.
|
||||
func (c *sidecars) Update(sidecar *v1alpha3.Sidecar) (result *v1alpha3.Sidecar, err error) {
|
||||
result = &v1alpha3.Sidecar{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("sidecars").
|
||||
Name(sidecar.Name).
|
||||
Body(sidecar).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the sidecar and deletes it. Returns an error if one occurs.
|
||||
func (c *sidecars) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("sidecars").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *sidecars) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("sidecars").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched sidecar.
|
||||
func (c *sidecars) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.Sidecar, err error) {
|
||||
result = &v1alpha3.Sidecar{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("sidecars").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
|
@ -1,174 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
scheme "knative.dev/pkg/client/istio/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// VirtualServicesGetter has a method to return a VirtualServiceInterface.
|
||||
// A group's client should implement this interface.
|
||||
type VirtualServicesGetter interface {
|
||||
VirtualServices(namespace string) VirtualServiceInterface
|
||||
}
|
||||
|
||||
// VirtualServiceInterface has methods to work with VirtualService resources.
|
||||
type VirtualServiceInterface interface {
|
||||
Create(*v1alpha3.VirtualService) (*v1alpha3.VirtualService, error)
|
||||
Update(*v1alpha3.VirtualService) (*v1alpha3.VirtualService, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v1alpha3.VirtualService, error)
|
||||
List(opts v1.ListOptions) (*v1alpha3.VirtualServiceList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.VirtualService, err error)
|
||||
VirtualServiceExpansion
|
||||
}
|
||||
|
||||
// virtualServices implements VirtualServiceInterface
|
||||
type virtualServices struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newVirtualServices returns a VirtualServices
|
||||
func newVirtualServices(c *NetworkingV1alpha3Client, namespace string) *virtualServices {
|
||||
return &virtualServices{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the virtualService, and returns the corresponding virtualService object, and an error if there is any.
|
||||
func (c *virtualServices) Get(name string, options v1.GetOptions) (result *v1alpha3.VirtualService, err error) {
|
||||
result = &v1alpha3.VirtualService{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("virtualservices").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of VirtualServices that match those selectors.
|
||||
func (c *virtualServices) List(opts v1.ListOptions) (result *v1alpha3.VirtualServiceList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha3.VirtualServiceList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("virtualservices").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested virtualServices.
|
||||
func (c *virtualServices) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("virtualservices").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a virtualService and creates it. Returns the server's representation of the virtualService, and an error, if there is any.
|
||||
func (c *virtualServices) Create(virtualService *v1alpha3.VirtualService) (result *v1alpha3.VirtualService, err error) {
|
||||
result = &v1alpha3.VirtualService{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("virtualservices").
|
||||
Body(virtualService).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a virtualService and updates it. Returns the server's representation of the virtualService, and an error, if there is any.
|
||||
func (c *virtualServices) Update(virtualService *v1alpha3.VirtualService) (result *v1alpha3.VirtualService, err error) {
|
||||
result = &v1alpha3.VirtualService{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("virtualservices").
|
||||
Name(virtualService.Name).
|
||||
Body(virtualService).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the virtualService and deletes it. Returns an error if one occurs.
|
||||
func (c *virtualServices) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("virtualservices").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *virtualServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("virtualservices").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched virtualService.
|
||||
func (c *virtualServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.VirtualService, err error) {
|
||||
result = &v1alpha3.VirtualService{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("virtualservices").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
|
@ -1,180 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package externalversions
|
||||
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
time "time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
versioned "knative.dev/pkg/client/istio/clientset/versioned"
|
||||
internalinterfaces "knative.dev/pkg/client/istio/informers/externalversions/internalinterfaces"
|
||||
networking "knative.dev/pkg/client/istio/informers/externalversions/networking"
|
||||
)
|
||||
|
||||
// SharedInformerOption defines the functional option type for SharedInformerFactory.
|
||||
type SharedInformerOption func(*sharedInformerFactory) *sharedInformerFactory
|
||||
|
||||
type sharedInformerFactory struct {
|
||||
client versioned.Interface
|
||||
namespace string
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
lock sync.Mutex
|
||||
defaultResync time.Duration
|
||||
customResync map[reflect.Type]time.Duration
|
||||
|
||||
informers map[reflect.Type]cache.SharedIndexInformer
|
||||
// startedInformers is used for tracking which informers have been started.
|
||||
// This allows Start() to be called multiple times safely.
|
||||
startedInformers map[reflect.Type]bool
|
||||
}
|
||||
|
||||
// WithCustomResyncConfig sets a custom resync period for the specified informer types.
|
||||
func WithCustomResyncConfig(resyncConfig map[v1.Object]time.Duration) SharedInformerOption {
|
||||
return func(factory *sharedInformerFactory) *sharedInformerFactory {
|
||||
for k, v := range resyncConfig {
|
||||
factory.customResync[reflect.TypeOf(k)] = v
|
||||
}
|
||||
return factory
|
||||
}
|
||||
}
|
||||
|
||||
// WithTweakListOptions sets a custom filter on all listers of the configured SharedInformerFactory.
|
||||
func WithTweakListOptions(tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerOption {
|
||||
return func(factory *sharedInformerFactory) *sharedInformerFactory {
|
||||
factory.tweakListOptions = tweakListOptions
|
||||
return factory
|
||||
}
|
||||
}
|
||||
|
||||
// WithNamespace limits the SharedInformerFactory to the specified namespace.
|
||||
func WithNamespace(namespace string) SharedInformerOption {
|
||||
return func(factory *sharedInformerFactory) *sharedInformerFactory {
|
||||
factory.namespace = namespace
|
||||
return factory
|
||||
}
|
||||
}
|
||||
|
||||
// NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces.
|
||||
func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Duration) SharedInformerFactory {
|
||||
return NewSharedInformerFactoryWithOptions(client, defaultResync)
|
||||
}
|
||||
|
||||
// NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory.
|
||||
// Listers obtained via this SharedInformerFactory will be subject to the same filters
|
||||
// as specified here.
|
||||
// Deprecated: Please use NewSharedInformerFactoryWithOptions instead
|
||||
func NewFilteredSharedInformerFactory(client versioned.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory {
|
||||
return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions))
|
||||
}
|
||||
|
||||
// NewSharedInformerFactoryWithOptions constructs a new instance of a SharedInformerFactory with additional options.
|
||||
func NewSharedInformerFactoryWithOptions(client versioned.Interface, defaultResync time.Duration, options ...SharedInformerOption) SharedInformerFactory {
|
||||
factory := &sharedInformerFactory{
|
||||
client: client,
|
||||
namespace: v1.NamespaceAll,
|
||||
defaultResync: defaultResync,
|
||||
informers: make(map[reflect.Type]cache.SharedIndexInformer),
|
||||
startedInformers: make(map[reflect.Type]bool),
|
||||
customResync: make(map[reflect.Type]time.Duration),
|
||||
}
|
||||
|
||||
// Apply all options
|
||||
for _, opt := range options {
|
||||
factory = opt(factory)
|
||||
}
|
||||
|
||||
return factory
|
||||
}
|
||||
|
||||
// Start initializes all requested informers.
|
||||
func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) {
|
||||
f.lock.Lock()
|
||||
defer f.lock.Unlock()
|
||||
|
||||
for informerType, informer := range f.informers {
|
||||
if !f.startedInformers[informerType] {
|
||||
go informer.Run(stopCh)
|
||||
f.startedInformers[informerType] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// WaitForCacheSync waits for all started informers' cache were synced.
|
||||
func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool {
|
||||
informers := func() map[reflect.Type]cache.SharedIndexInformer {
|
||||
f.lock.Lock()
|
||||
defer f.lock.Unlock()
|
||||
|
||||
informers := map[reflect.Type]cache.SharedIndexInformer{}
|
||||
for informerType, informer := range f.informers {
|
||||
if f.startedInformers[informerType] {
|
||||
informers[informerType] = informer
|
||||
}
|
||||
}
|
||||
return informers
|
||||
}()
|
||||
|
||||
res := map[reflect.Type]bool{}
|
||||
for informType, informer := range informers {
|
||||
res[informType] = cache.WaitForCacheSync(stopCh, informer.HasSynced)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
// InternalInformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// client.
|
||||
func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer {
|
||||
f.lock.Lock()
|
||||
defer f.lock.Unlock()
|
||||
|
||||
informerType := reflect.TypeOf(obj)
|
||||
informer, exists := f.informers[informerType]
|
||||
if exists {
|
||||
return informer
|
||||
}
|
||||
|
||||
resyncPeriod, exists := f.customResync[informerType]
|
||||
if !exists {
|
||||
resyncPeriod = f.defaultResync
|
||||
}
|
||||
|
||||
informer = newFunc(f.client, resyncPeriod)
|
||||
f.informers[informerType] = informer
|
||||
|
||||
return informer
|
||||
}
|
||||
|
||||
// SharedInformerFactory provides shared informers for resources in all known
|
||||
// API group versions.
|
||||
type SharedInformerFactory interface {
|
||||
internalinterfaces.SharedInformerFactory
|
||||
ForResource(resource schema.GroupVersionResource) (GenericInformer, error)
|
||||
WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool
|
||||
|
||||
Networking() networking.Interface
|
||||
}
|
||||
|
||||
func (f *sharedInformerFactory) Networking() networking.Interface {
|
||||
return networking.New(f, f.namespace, f.tweakListOptions)
|
||||
}
|
|
@ -1,72 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package externalversions
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// GenericInformer is type of SharedIndexInformer which will locate and delegate to other
|
||||
// sharedInformers based on type
|
||||
type GenericInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() cache.GenericLister
|
||||
}
|
||||
|
||||
type genericInformer struct {
|
||||
informer cache.SharedIndexInformer
|
||||
resource schema.GroupResource
|
||||
}
|
||||
|
||||
// Informer returns the SharedIndexInformer.
|
||||
func (f *genericInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.informer
|
||||
}
|
||||
|
||||
// Lister returns the GenericLister.
|
||||
func (f *genericInformer) Lister() cache.GenericLister {
|
||||
return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource)
|
||||
}
|
||||
|
||||
// ForResource gives generic access to a shared informer of the matching type
|
||||
// TODO extend this to unknown resources with a client pool
|
||||
func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) {
|
||||
switch resource {
|
||||
// Group=networking.istio.io, Version=v1alpha3
|
||||
case v1alpha3.SchemeGroupVersion.WithResource("destinationrules"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1alpha3().DestinationRules().Informer()}, nil
|
||||
case v1alpha3.SchemeGroupVersion.WithResource("envoyfilters"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1alpha3().EnvoyFilters().Informer()}, nil
|
||||
case v1alpha3.SchemeGroupVersion.WithResource("gateways"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1alpha3().Gateways().Informer()}, nil
|
||||
case v1alpha3.SchemeGroupVersion.WithResource("serviceentries"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1alpha3().ServiceEntries().Informer()}, nil
|
||||
case v1alpha3.SchemeGroupVersion.WithResource("sidecars"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1alpha3().Sidecars().Informer()}, nil
|
||||
case v1alpha3.SchemeGroupVersion.WithResource("virtualservices"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1alpha3().VirtualServices().Informer()}, nil
|
||||
|
||||
}
|
||||
|
||||
return nil, fmt.Errorf("no informer found for %v", resource)
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package internalinterfaces
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
versioned "knative.dev/pkg/client/istio/clientset/versioned"
|
||||
)
|
||||
|
||||
// NewInformerFunc takes versioned.Interface and time.Duration to return a SharedIndexInformer.
|
||||
type NewInformerFunc func(versioned.Interface, time.Duration) cache.SharedIndexInformer
|
||||
|
||||
// SharedInformerFactory a small interface to allow for adding an informer without an import cycle
|
||||
type SharedInformerFactory interface {
|
||||
Start(stopCh <-chan struct{})
|
||||
InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer
|
||||
}
|
||||
|
||||
// TweakListOptionsFunc is a function that transforms a v1.ListOptions.
|
||||
type TweakListOptionsFunc func(*v1.ListOptions)
|
46
vendor/knative.dev/pkg/client/istio/informers/externalversions/networking/interface.go
generated
vendored
46
vendor/knative.dev/pkg/client/istio/informers/externalversions/networking/interface.go
generated
vendored
|
@ -1,46 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package networking
|
||||
|
||||
import (
|
||||
internalinterfaces "knative.dev/pkg/client/istio/informers/externalversions/internalinterfaces"
|
||||
v1alpha3 "knative.dev/pkg/client/istio/informers/externalversions/networking/v1alpha3"
|
||||
)
|
||||
|
||||
// Interface provides access to each of this group's versions.
|
||||
type Interface interface {
|
||||
// V1alpha3 provides access to shared informers for resources in V1alpha3.
|
||||
V1alpha3() v1alpha3.Interface
|
||||
}
|
||||
|
||||
type group struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
namespace string
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// New returns a new Interface.
|
||||
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
|
||||
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// V1alpha3 returns a new v1alpha3.Interface.
|
||||
func (g *group) V1alpha3() v1alpha3.Interface {
|
||||
return v1alpha3.New(g.factory, g.namespace, g.tweakListOptions)
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
networkingv1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
v1 "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"
|
||||
versioned "knative.dev/pkg/client/istio/clientset/versioned"
|
||||
internalinterfaces "knative.dev/pkg/client/istio/informers/externalversions/internalinterfaces"
|
||||
v1alpha3 "knative.dev/pkg/client/istio/listers/networking/v1alpha3"
|
||||
)
|
||||
|
||||
// DestinationRuleInformer provides access to a shared informer and lister for
|
||||
// DestinationRules.
|
||||
type DestinationRuleInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha3.DestinationRuleLister
|
||||
}
|
||||
|
||||
type destinationRuleInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewDestinationRuleInformer constructs a new informer for DestinationRule type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewDestinationRuleInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredDestinationRuleInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredDestinationRuleInformer constructs a new informer for DestinationRule type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredDestinationRuleInformer(client versioned.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) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NetworkingV1alpha3().DestinationRules(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NetworkingV1alpha3().DestinationRules(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&networkingv1alpha3.DestinationRule{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *destinationRuleInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredDestinationRuleInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *destinationRuleInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&networkingv1alpha3.DestinationRule{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *destinationRuleInformer) Lister() v1alpha3.DestinationRuleLister {
|
||||
return v1alpha3.NewDestinationRuleLister(f.Informer().GetIndexer())
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
networkingv1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
v1 "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"
|
||||
versioned "knative.dev/pkg/client/istio/clientset/versioned"
|
||||
internalinterfaces "knative.dev/pkg/client/istio/informers/externalversions/internalinterfaces"
|
||||
v1alpha3 "knative.dev/pkg/client/istio/listers/networking/v1alpha3"
|
||||
)
|
||||
|
||||
// EnvoyFilterInformer provides access to a shared informer and lister for
|
||||
// EnvoyFilters.
|
||||
type EnvoyFilterInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha3.EnvoyFilterLister
|
||||
}
|
||||
|
||||
type envoyFilterInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewEnvoyFilterInformer constructs a new informer for EnvoyFilter type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewEnvoyFilterInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredEnvoyFilterInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredEnvoyFilterInformer constructs a new informer for EnvoyFilter type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredEnvoyFilterInformer(client versioned.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) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NetworkingV1alpha3().EnvoyFilters(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NetworkingV1alpha3().EnvoyFilters(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&networkingv1alpha3.EnvoyFilter{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *envoyFilterInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredEnvoyFilterInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *envoyFilterInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&networkingv1alpha3.EnvoyFilter{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *envoyFilterInformer) Lister() v1alpha3.EnvoyFilterLister {
|
||||
return v1alpha3.NewEnvoyFilterLister(f.Informer().GetIndexer())
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
networkingv1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
v1 "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"
|
||||
versioned "knative.dev/pkg/client/istio/clientset/versioned"
|
||||
internalinterfaces "knative.dev/pkg/client/istio/informers/externalversions/internalinterfaces"
|
||||
v1alpha3 "knative.dev/pkg/client/istio/listers/networking/v1alpha3"
|
||||
)
|
||||
|
||||
// GatewayInformer provides access to a shared informer and lister for
|
||||
// Gateways.
|
||||
type GatewayInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha3.GatewayLister
|
||||
}
|
||||
|
||||
type gatewayInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewGatewayInformer constructs a new informer for Gateway type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewGatewayInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredGatewayInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredGatewayInformer constructs a new informer for Gateway type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredGatewayInformer(client versioned.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) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NetworkingV1alpha3().Gateways(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NetworkingV1alpha3().Gateways(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&networkingv1alpha3.Gateway{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *gatewayInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredGatewayInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *gatewayInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&networkingv1alpha3.Gateway{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *gatewayInformer) Lister() v1alpha3.GatewayLister {
|
||||
return v1alpha3.NewGatewayLister(f.Informer().GetIndexer())
|
||||
}
|
|
@ -1,80 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
internalinterfaces "knative.dev/pkg/client/istio/informers/externalversions/internalinterfaces"
|
||||
)
|
||||
|
||||
// Interface provides access to all the informers in this group version.
|
||||
type Interface interface {
|
||||
// DestinationRules returns a DestinationRuleInformer.
|
||||
DestinationRules() DestinationRuleInformer
|
||||
// EnvoyFilters returns a EnvoyFilterInformer.
|
||||
EnvoyFilters() EnvoyFilterInformer
|
||||
// Gateways returns a GatewayInformer.
|
||||
Gateways() GatewayInformer
|
||||
// ServiceEntries returns a ServiceEntryInformer.
|
||||
ServiceEntries() ServiceEntryInformer
|
||||
// Sidecars returns a SidecarInformer.
|
||||
Sidecars() SidecarInformer
|
||||
// VirtualServices returns a VirtualServiceInformer.
|
||||
VirtualServices() VirtualServiceInformer
|
||||
}
|
||||
|
||||
type version struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
namespace string
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// New returns a new Interface.
|
||||
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
|
||||
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// DestinationRules returns a DestinationRuleInformer.
|
||||
func (v *version) DestinationRules() DestinationRuleInformer {
|
||||
return &destinationRuleInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// EnvoyFilters returns a EnvoyFilterInformer.
|
||||
func (v *version) EnvoyFilters() EnvoyFilterInformer {
|
||||
return &envoyFilterInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// Gateways returns a GatewayInformer.
|
||||
func (v *version) Gateways() GatewayInformer {
|
||||
return &gatewayInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// ServiceEntries returns a ServiceEntryInformer.
|
||||
func (v *version) ServiceEntries() ServiceEntryInformer {
|
||||
return &serviceEntryInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// Sidecars returns a SidecarInformer.
|
||||
func (v *version) Sidecars() SidecarInformer {
|
||||
return &sidecarInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// VirtualServices returns a VirtualServiceInformer.
|
||||
func (v *version) VirtualServices() VirtualServiceInformer {
|
||||
return &virtualServiceInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
networkingv1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
v1 "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"
|
||||
versioned "knative.dev/pkg/client/istio/clientset/versioned"
|
||||
internalinterfaces "knative.dev/pkg/client/istio/informers/externalversions/internalinterfaces"
|
||||
v1alpha3 "knative.dev/pkg/client/istio/listers/networking/v1alpha3"
|
||||
)
|
||||
|
||||
// ServiceEntryInformer provides access to a shared informer and lister for
|
||||
// ServiceEntries.
|
||||
type ServiceEntryInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha3.ServiceEntryLister
|
||||
}
|
||||
|
||||
type serviceEntryInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewServiceEntryInformer constructs a new informer for ServiceEntry type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewServiceEntryInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredServiceEntryInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredServiceEntryInformer constructs a new informer for ServiceEntry type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredServiceEntryInformer(client versioned.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) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NetworkingV1alpha3().ServiceEntries(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NetworkingV1alpha3().ServiceEntries(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&networkingv1alpha3.ServiceEntry{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *serviceEntryInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredServiceEntryInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *serviceEntryInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&networkingv1alpha3.ServiceEntry{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *serviceEntryInformer) Lister() v1alpha3.ServiceEntryLister {
|
||||
return v1alpha3.NewServiceEntryLister(f.Informer().GetIndexer())
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
networkingv1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
v1 "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"
|
||||
versioned "knative.dev/pkg/client/istio/clientset/versioned"
|
||||
internalinterfaces "knative.dev/pkg/client/istio/informers/externalversions/internalinterfaces"
|
||||
v1alpha3 "knative.dev/pkg/client/istio/listers/networking/v1alpha3"
|
||||
)
|
||||
|
||||
// SidecarInformer provides access to a shared informer and lister for
|
||||
// Sidecars.
|
||||
type SidecarInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha3.SidecarLister
|
||||
}
|
||||
|
||||
type sidecarInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewSidecarInformer constructs a new informer for Sidecar type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewSidecarInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredSidecarInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredSidecarInformer constructs a new informer for Sidecar type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredSidecarInformer(client versioned.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) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NetworkingV1alpha3().Sidecars(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NetworkingV1alpha3().Sidecars(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&networkingv1alpha3.Sidecar{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *sidecarInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredSidecarInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *sidecarInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&networkingv1alpha3.Sidecar{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *sidecarInformer) Lister() v1alpha3.SidecarLister {
|
||||
return v1alpha3.NewSidecarLister(f.Informer().GetIndexer())
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
networkingv1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
v1 "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"
|
||||
versioned "knative.dev/pkg/client/istio/clientset/versioned"
|
||||
internalinterfaces "knative.dev/pkg/client/istio/informers/externalversions/internalinterfaces"
|
||||
v1alpha3 "knative.dev/pkg/client/istio/listers/networking/v1alpha3"
|
||||
)
|
||||
|
||||
// VirtualServiceInformer provides access to a shared informer and lister for
|
||||
// VirtualServices.
|
||||
type VirtualServiceInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha3.VirtualServiceLister
|
||||
}
|
||||
|
||||
type virtualServiceInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewVirtualServiceInformer constructs a new informer for VirtualService type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewVirtualServiceInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredVirtualServiceInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredVirtualServiceInformer constructs a new informer for VirtualService type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredVirtualServiceInformer(client versioned.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) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NetworkingV1alpha3().VirtualServices(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NetworkingV1alpha3().VirtualServices(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&networkingv1alpha3.VirtualService{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *virtualServiceInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredVirtualServiceInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *virtualServiceInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&networkingv1alpha3.VirtualService{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *virtualServiceInformer) Lister() v1alpha3.VirtualServiceLister {
|
||||
return v1alpha3.NewVirtualServiceLister(f.Informer().GetIndexer())
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
rest "k8s.io/client-go/rest"
|
||||
versioned "knative.dev/pkg/client/istio/clientset/versioned"
|
||||
injection "knative.dev/pkg/injection"
|
||||
logging "knative.dev/pkg/logging"
|
||||
)
|
||||
|
||||
func init() {
|
||||
injection.Default.RegisterClient(withClient)
|
||||
}
|
||||
|
||||
// Key is used as the key for associating information with a context.Context.
|
||||
type Key struct{}
|
||||
|
||||
func withClient(ctx context.Context, cfg *rest.Config) context.Context {
|
||||
return context.WithValue(ctx, Key{}, versioned.NewForConfigOrDie(cfg))
|
||||
}
|
||||
|
||||
// Get extracts the versioned.Interface client from the context.
|
||||
func Get(ctx context.Context) versioned.Interface {
|
||||
untyped := ctx.Value(Key{})
|
||||
if untyped == nil {
|
||||
logging.FromContext(ctx).Panic(
|
||||
"Unable to fetch knative.dev/pkg/client/istio/clientset/versioned.Interface from context.")
|
||||
}
|
||||
return untyped.(versioned.Interface)
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/client-go/rest"
|
||||
fake "knative.dev/pkg/client/istio/clientset/versioned/fake"
|
||||
client "knative.dev/pkg/client/istio/injection/client"
|
||||
injection "knative.dev/pkg/injection"
|
||||
logging "knative.dev/pkg/logging"
|
||||
)
|
||||
|
||||
func init() {
|
||||
injection.Fake.RegisterClient(withClient)
|
||||
}
|
||||
|
||||
func withClient(ctx context.Context, cfg *rest.Config) context.Context {
|
||||
ctx, _ = With(ctx)
|
||||
return ctx
|
||||
}
|
||||
|
||||
func With(ctx context.Context, objects ...runtime.Object) (context.Context, *fake.Clientset) {
|
||||
cs := fake.NewSimpleClientset(objects...)
|
||||
return context.WithValue(ctx, client.Key{}, cs), cs
|
||||
}
|
||||
|
||||
// Get extracts the Kubernetes client from the context.
|
||||
func Get(ctx context.Context) *fake.Clientset {
|
||||
untyped := ctx.Value(client.Key{})
|
||||
if untyped == nil {
|
||||
logging.FromContext(ctx).Panic(
|
||||
"Unable to fetch knative.dev/pkg/client/istio/clientset/versioned/fake.Clientset from context.")
|
||||
}
|
||||
return untyped.(*fake.Clientset)
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package factory
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
externalversions "knative.dev/pkg/client/istio/informers/externalversions"
|
||||
client "knative.dev/pkg/client/istio/injection/client"
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
logging "knative.dev/pkg/logging"
|
||||
)
|
||||
|
||||
func init() {
|
||||
injection.Default.RegisterInformerFactory(withInformerFactory)
|
||||
}
|
||||
|
||||
// Key is used as the key for associating information with a context.Context.
|
||||
type Key struct{}
|
||||
|
||||
func withInformerFactory(ctx context.Context) context.Context {
|
||||
c := client.Get(ctx)
|
||||
opts := make([]externalversions.SharedInformerOption, 0, 1)
|
||||
if injection.HasNamespaceScope(ctx) {
|
||||
opts = append(opts, externalversions.WithNamespace(injection.GetNamespaceScope(ctx)))
|
||||
}
|
||||
return context.WithValue(ctx, Key{},
|
||||
externalversions.NewSharedInformerFactoryWithOptions(c, controller.GetResyncPeriod(ctx), opts...))
|
||||
}
|
||||
|
||||
// Get extracts the InformerFactory from the context.
|
||||
func Get(ctx context.Context) externalversions.SharedInformerFactory {
|
||||
untyped := ctx.Value(Key{})
|
||||
if untyped == nil {
|
||||
logging.FromContext(ctx).Panic(
|
||||
"Unable to fetch knative.dev/pkg/client/istio/informers/externalversions.SharedInformerFactory from context.")
|
||||
}
|
||||
return untyped.(externalversions.SharedInformerFactory)
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
externalversions "knative.dev/pkg/client/istio/informers/externalversions"
|
||||
fake "knative.dev/pkg/client/istio/injection/client/fake"
|
||||
factory "knative.dev/pkg/client/istio/injection/informers/factory"
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
)
|
||||
|
||||
var Get = factory.Get
|
||||
|
||||
func init() {
|
||||
injection.Fake.RegisterInformerFactory(withInformerFactory)
|
||||
}
|
||||
|
||||
func withInformerFactory(ctx context.Context) context.Context {
|
||||
c := fake.Get(ctx)
|
||||
opts := make([]externalversions.SharedInformerOption, 0, 1)
|
||||
if injection.HasNamespaceScope(ctx) {
|
||||
opts = append(opts, externalversions.WithNamespace(injection.GetNamespaceScope(ctx)))
|
||||
}
|
||||
return context.WithValue(ctx, factory.Key{},
|
||||
externalversions.NewSharedInformerFactoryWithOptions(c, controller.GetResyncPeriod(ctx), opts...))
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package destinationrule
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1alpha3 "knative.dev/pkg/client/istio/informers/externalversions/networking/v1alpha3"
|
||||
factory "knative.dev/pkg/client/istio/injection/informers/factory"
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
logging "knative.dev/pkg/logging"
|
||||
)
|
||||
|
||||
func init() {
|
||||
injection.Default.RegisterInformer(withInformer)
|
||||
}
|
||||
|
||||
// Key is used for associating the Informer inside the context.Context.
|
||||
type Key struct{}
|
||||
|
||||
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
|
||||
f := factory.Get(ctx)
|
||||
inf := f.Networking().V1alpha3().DestinationRules()
|
||||
return context.WithValue(ctx, Key{}, inf), inf.Informer()
|
||||
}
|
||||
|
||||
// Get extracts the typed informer from the context.
|
||||
func Get(ctx context.Context) v1alpha3.DestinationRuleInformer {
|
||||
untyped := ctx.Value(Key{})
|
||||
if untyped == nil {
|
||||
logging.FromContext(ctx).Panic(
|
||||
"Unable to fetch knative.dev/pkg/client/istio/informers/externalversions/networking/v1alpha3.DestinationRuleInformer from context.")
|
||||
}
|
||||
return untyped.(v1alpha3.DestinationRuleInformer)
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
fake "knative.dev/pkg/client/istio/injection/informers/factory/fake"
|
||||
destinationrule "knative.dev/pkg/client/istio/injection/informers/networking/v1alpha3/destinationrule"
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
)
|
||||
|
||||
var Get = destinationrule.Get
|
||||
|
||||
func init() {
|
||||
injection.Fake.RegisterInformer(withInformer)
|
||||
}
|
||||
|
||||
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
|
||||
f := fake.Get(ctx)
|
||||
inf := f.Networking().V1alpha3().DestinationRules()
|
||||
return context.WithValue(ctx, destinationrule.Key{}, inf), inf.Informer()
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package envoyfilter
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1alpha3 "knative.dev/pkg/client/istio/informers/externalversions/networking/v1alpha3"
|
||||
factory "knative.dev/pkg/client/istio/injection/informers/factory"
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
logging "knative.dev/pkg/logging"
|
||||
)
|
||||
|
||||
func init() {
|
||||
injection.Default.RegisterInformer(withInformer)
|
||||
}
|
||||
|
||||
// Key is used for associating the Informer inside the context.Context.
|
||||
type Key struct{}
|
||||
|
||||
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
|
||||
f := factory.Get(ctx)
|
||||
inf := f.Networking().V1alpha3().EnvoyFilters()
|
||||
return context.WithValue(ctx, Key{}, inf), inf.Informer()
|
||||
}
|
||||
|
||||
// Get extracts the typed informer from the context.
|
||||
func Get(ctx context.Context) v1alpha3.EnvoyFilterInformer {
|
||||
untyped := ctx.Value(Key{})
|
||||
if untyped == nil {
|
||||
logging.FromContext(ctx).Panic(
|
||||
"Unable to fetch knative.dev/pkg/client/istio/informers/externalversions/networking/v1alpha3.EnvoyFilterInformer from context.")
|
||||
}
|
||||
return untyped.(v1alpha3.EnvoyFilterInformer)
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
fake "knative.dev/pkg/client/istio/injection/informers/factory/fake"
|
||||
envoyfilter "knative.dev/pkg/client/istio/injection/informers/networking/v1alpha3/envoyfilter"
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
)
|
||||
|
||||
var Get = envoyfilter.Get
|
||||
|
||||
func init() {
|
||||
injection.Fake.RegisterInformer(withInformer)
|
||||
}
|
||||
|
||||
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
|
||||
f := fake.Get(ctx)
|
||||
inf := f.Networking().V1alpha3().EnvoyFilters()
|
||||
return context.WithValue(ctx, envoyfilter.Key{}, inf), inf.Informer()
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
fake "knative.dev/pkg/client/istio/injection/informers/factory/fake"
|
||||
gateway "knative.dev/pkg/client/istio/injection/informers/networking/v1alpha3/gateway"
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
)
|
||||
|
||||
var Get = gateway.Get
|
||||
|
||||
func init() {
|
||||
injection.Fake.RegisterInformer(withInformer)
|
||||
}
|
||||
|
||||
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
|
||||
f := fake.Get(ctx)
|
||||
inf := f.Networking().V1alpha3().Gateways()
|
||||
return context.WithValue(ctx, gateway.Key{}, inf), inf.Informer()
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package gateway
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1alpha3 "knative.dev/pkg/client/istio/informers/externalversions/networking/v1alpha3"
|
||||
factory "knative.dev/pkg/client/istio/injection/informers/factory"
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
logging "knative.dev/pkg/logging"
|
||||
)
|
||||
|
||||
func init() {
|
||||
injection.Default.RegisterInformer(withInformer)
|
||||
}
|
||||
|
||||
// Key is used for associating the Informer inside the context.Context.
|
||||
type Key struct{}
|
||||
|
||||
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
|
||||
f := factory.Get(ctx)
|
||||
inf := f.Networking().V1alpha3().Gateways()
|
||||
return context.WithValue(ctx, Key{}, inf), inf.Informer()
|
||||
}
|
||||
|
||||
// Get extracts the typed informer from the context.
|
||||
func Get(ctx context.Context) v1alpha3.GatewayInformer {
|
||||
untyped := ctx.Value(Key{})
|
||||
if untyped == nil {
|
||||
logging.FromContext(ctx).Panic(
|
||||
"Unable to fetch knative.dev/pkg/client/istio/informers/externalversions/networking/v1alpha3.GatewayInformer from context.")
|
||||
}
|
||||
return untyped.(v1alpha3.GatewayInformer)
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
fake "knative.dev/pkg/client/istio/injection/informers/factory/fake"
|
||||
serviceentry "knative.dev/pkg/client/istio/injection/informers/networking/v1alpha3/serviceentry"
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
)
|
||||
|
||||
var Get = serviceentry.Get
|
||||
|
||||
func init() {
|
||||
injection.Fake.RegisterInformer(withInformer)
|
||||
}
|
||||
|
||||
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
|
||||
f := fake.Get(ctx)
|
||||
inf := f.Networking().V1alpha3().ServiceEntries()
|
||||
return context.WithValue(ctx, serviceentry.Key{}, inf), inf.Informer()
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package serviceentry
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1alpha3 "knative.dev/pkg/client/istio/informers/externalversions/networking/v1alpha3"
|
||||
factory "knative.dev/pkg/client/istio/injection/informers/factory"
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
logging "knative.dev/pkg/logging"
|
||||
)
|
||||
|
||||
func init() {
|
||||
injection.Default.RegisterInformer(withInformer)
|
||||
}
|
||||
|
||||
// Key is used for associating the Informer inside the context.Context.
|
||||
type Key struct{}
|
||||
|
||||
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
|
||||
f := factory.Get(ctx)
|
||||
inf := f.Networking().V1alpha3().ServiceEntries()
|
||||
return context.WithValue(ctx, Key{}, inf), inf.Informer()
|
||||
}
|
||||
|
||||
// Get extracts the typed informer from the context.
|
||||
func Get(ctx context.Context) v1alpha3.ServiceEntryInformer {
|
||||
untyped := ctx.Value(Key{})
|
||||
if untyped == nil {
|
||||
logging.FromContext(ctx).Panic(
|
||||
"Unable to fetch knative.dev/pkg/client/istio/informers/externalversions/networking/v1alpha3.ServiceEntryInformer from context.")
|
||||
}
|
||||
return untyped.(v1alpha3.ServiceEntryInformer)
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
fake "knative.dev/pkg/client/istio/injection/informers/factory/fake"
|
||||
sidecar "knative.dev/pkg/client/istio/injection/informers/networking/v1alpha3/sidecar"
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
)
|
||||
|
||||
var Get = sidecar.Get
|
||||
|
||||
func init() {
|
||||
injection.Fake.RegisterInformer(withInformer)
|
||||
}
|
||||
|
||||
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
|
||||
f := fake.Get(ctx)
|
||||
inf := f.Networking().V1alpha3().Sidecars()
|
||||
return context.WithValue(ctx, sidecar.Key{}, inf), inf.Informer()
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package sidecar
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1alpha3 "knative.dev/pkg/client/istio/informers/externalversions/networking/v1alpha3"
|
||||
factory "knative.dev/pkg/client/istio/injection/informers/factory"
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
logging "knative.dev/pkg/logging"
|
||||
)
|
||||
|
||||
func init() {
|
||||
injection.Default.RegisterInformer(withInformer)
|
||||
}
|
||||
|
||||
// Key is used for associating the Informer inside the context.Context.
|
||||
type Key struct{}
|
||||
|
||||
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
|
||||
f := factory.Get(ctx)
|
||||
inf := f.Networking().V1alpha3().Sidecars()
|
||||
return context.WithValue(ctx, Key{}, inf), inf.Informer()
|
||||
}
|
||||
|
||||
// Get extracts the typed informer from the context.
|
||||
func Get(ctx context.Context) v1alpha3.SidecarInformer {
|
||||
untyped := ctx.Value(Key{})
|
||||
if untyped == nil {
|
||||
logging.FromContext(ctx).Panic(
|
||||
"Unable to fetch knative.dev/pkg/client/istio/informers/externalversions/networking/v1alpha3.SidecarInformer from context.")
|
||||
}
|
||||
return untyped.(v1alpha3.SidecarInformer)
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
fake "knative.dev/pkg/client/istio/injection/informers/factory/fake"
|
||||
virtualservice "knative.dev/pkg/client/istio/injection/informers/networking/v1alpha3/virtualservice"
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
)
|
||||
|
||||
var Get = virtualservice.Get
|
||||
|
||||
func init() {
|
||||
injection.Fake.RegisterInformer(withInformer)
|
||||
}
|
||||
|
||||
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
|
||||
f := fake.Get(ctx)
|
||||
inf := f.Networking().V1alpha3().VirtualServices()
|
||||
return context.WithValue(ctx, virtualservice.Key{}, inf), inf.Informer()
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by injection-gen. DO NOT EDIT.
|
||||
|
||||
package virtualservice
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1alpha3 "knative.dev/pkg/client/istio/informers/externalversions/networking/v1alpha3"
|
||||
factory "knative.dev/pkg/client/istio/injection/informers/factory"
|
||||
controller "knative.dev/pkg/controller"
|
||||
injection "knative.dev/pkg/injection"
|
||||
logging "knative.dev/pkg/logging"
|
||||
)
|
||||
|
||||
func init() {
|
||||
injection.Default.RegisterInformer(withInformer)
|
||||
}
|
||||
|
||||
// Key is used for associating the Informer inside the context.Context.
|
||||
type Key struct{}
|
||||
|
||||
func withInformer(ctx context.Context) (context.Context, controller.Informer) {
|
||||
f := factory.Get(ctx)
|
||||
inf := f.Networking().V1alpha3().VirtualServices()
|
||||
return context.WithValue(ctx, Key{}, inf), inf.Informer()
|
||||
}
|
||||
|
||||
// Get extracts the typed informer from the context.
|
||||
func Get(ctx context.Context) v1alpha3.VirtualServiceInformer {
|
||||
untyped := ctx.Value(Key{})
|
||||
if untyped == nil {
|
||||
logging.FromContext(ctx).Panic(
|
||||
"Unable to fetch knative.dev/pkg/client/istio/informers/externalversions/networking/v1alpha3.VirtualServiceInformer from context.")
|
||||
}
|
||||
return untyped.(v1alpha3.VirtualServiceInformer)
|
||||
}
|
94
vendor/knative.dev/pkg/client/istio/listers/networking/v1alpha3/destinationrule.go
generated
vendored
94
vendor/knative.dev/pkg/client/istio/listers/networking/v1alpha3/destinationrule.go
generated
vendored
|
@ -1,94 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// DestinationRuleLister helps list DestinationRules.
|
||||
type DestinationRuleLister interface {
|
||||
// List lists all DestinationRules in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1alpha3.DestinationRule, err error)
|
||||
// DestinationRules returns an object that can list and get DestinationRules.
|
||||
DestinationRules(namespace string) DestinationRuleNamespaceLister
|
||||
DestinationRuleListerExpansion
|
||||
}
|
||||
|
||||
// destinationRuleLister implements the DestinationRuleLister interface.
|
||||
type destinationRuleLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewDestinationRuleLister returns a new DestinationRuleLister.
|
||||
func NewDestinationRuleLister(indexer cache.Indexer) DestinationRuleLister {
|
||||
return &destinationRuleLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all DestinationRules in the indexer.
|
||||
func (s *destinationRuleLister) List(selector labels.Selector) (ret []*v1alpha3.DestinationRule, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha3.DestinationRule))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// DestinationRules returns an object that can list and get DestinationRules.
|
||||
func (s *destinationRuleLister) DestinationRules(namespace string) DestinationRuleNamespaceLister {
|
||||
return destinationRuleNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// DestinationRuleNamespaceLister helps list and get DestinationRules.
|
||||
type DestinationRuleNamespaceLister interface {
|
||||
// List lists all DestinationRules in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v1alpha3.DestinationRule, err error)
|
||||
// Get retrieves the DestinationRule from the indexer for a given namespace and name.
|
||||
Get(name string) (*v1alpha3.DestinationRule, error)
|
||||
DestinationRuleNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// destinationRuleNamespaceLister implements the DestinationRuleNamespaceLister
|
||||
// interface.
|
||||
type destinationRuleNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all DestinationRules in the indexer for a given namespace.
|
||||
func (s destinationRuleNamespaceLister) List(selector labels.Selector) (ret []*v1alpha3.DestinationRule, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha3.DestinationRule))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the DestinationRule from the indexer for a given namespace and name.
|
||||
func (s destinationRuleNamespaceLister) Get(name string) (*v1alpha3.DestinationRule, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha3.Resource("destinationrule"), name)
|
||||
}
|
||||
return obj.(*v1alpha3.DestinationRule), nil
|
||||
}
|
94
vendor/knative.dev/pkg/client/istio/listers/networking/v1alpha3/envoyfilter.go
generated
vendored
94
vendor/knative.dev/pkg/client/istio/listers/networking/v1alpha3/envoyfilter.go
generated
vendored
|
@ -1,94 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// EnvoyFilterLister helps list EnvoyFilters.
|
||||
type EnvoyFilterLister interface {
|
||||
// List lists all EnvoyFilters in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1alpha3.EnvoyFilter, err error)
|
||||
// EnvoyFilters returns an object that can list and get EnvoyFilters.
|
||||
EnvoyFilters(namespace string) EnvoyFilterNamespaceLister
|
||||
EnvoyFilterListerExpansion
|
||||
}
|
||||
|
||||
// envoyFilterLister implements the EnvoyFilterLister interface.
|
||||
type envoyFilterLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewEnvoyFilterLister returns a new EnvoyFilterLister.
|
||||
func NewEnvoyFilterLister(indexer cache.Indexer) EnvoyFilterLister {
|
||||
return &envoyFilterLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all EnvoyFilters in the indexer.
|
||||
func (s *envoyFilterLister) List(selector labels.Selector) (ret []*v1alpha3.EnvoyFilter, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha3.EnvoyFilter))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// EnvoyFilters returns an object that can list and get EnvoyFilters.
|
||||
func (s *envoyFilterLister) EnvoyFilters(namespace string) EnvoyFilterNamespaceLister {
|
||||
return envoyFilterNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// EnvoyFilterNamespaceLister helps list and get EnvoyFilters.
|
||||
type EnvoyFilterNamespaceLister interface {
|
||||
// List lists all EnvoyFilters in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v1alpha3.EnvoyFilter, err error)
|
||||
// Get retrieves the EnvoyFilter from the indexer for a given namespace and name.
|
||||
Get(name string) (*v1alpha3.EnvoyFilter, error)
|
||||
EnvoyFilterNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// envoyFilterNamespaceLister implements the EnvoyFilterNamespaceLister
|
||||
// interface.
|
||||
type envoyFilterNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all EnvoyFilters in the indexer for a given namespace.
|
||||
func (s envoyFilterNamespaceLister) List(selector labels.Selector) (ret []*v1alpha3.EnvoyFilter, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha3.EnvoyFilter))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the EnvoyFilter from the indexer for a given namespace and name.
|
||||
func (s envoyFilterNamespaceLister) Get(name string) (*v1alpha3.EnvoyFilter, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha3.Resource("envoyfilter"), name)
|
||||
}
|
||||
return obj.(*v1alpha3.EnvoyFilter), nil
|
||||
}
|
67
vendor/knative.dev/pkg/client/istio/listers/networking/v1alpha3/expansion_generated.go
generated
vendored
67
vendor/knative.dev/pkg/client/istio/listers/networking/v1alpha3/expansion_generated.go
generated
vendored
|
@ -1,67 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
// DestinationRuleListerExpansion allows custom methods to be added to
|
||||
// DestinationRuleLister.
|
||||
type DestinationRuleListerExpansion interface{}
|
||||
|
||||
// DestinationRuleNamespaceListerExpansion allows custom methods to be added to
|
||||
// DestinationRuleNamespaceLister.
|
||||
type DestinationRuleNamespaceListerExpansion interface{}
|
||||
|
||||
// EnvoyFilterListerExpansion allows custom methods to be added to
|
||||
// EnvoyFilterLister.
|
||||
type EnvoyFilterListerExpansion interface{}
|
||||
|
||||
// EnvoyFilterNamespaceListerExpansion allows custom methods to be added to
|
||||
// EnvoyFilterNamespaceLister.
|
||||
type EnvoyFilterNamespaceListerExpansion interface{}
|
||||
|
||||
// GatewayListerExpansion allows custom methods to be added to
|
||||
// GatewayLister.
|
||||
type GatewayListerExpansion interface{}
|
||||
|
||||
// GatewayNamespaceListerExpansion allows custom methods to be added to
|
||||
// GatewayNamespaceLister.
|
||||
type GatewayNamespaceListerExpansion interface{}
|
||||
|
||||
// ServiceEntryListerExpansion allows custom methods to be added to
|
||||
// ServiceEntryLister.
|
||||
type ServiceEntryListerExpansion interface{}
|
||||
|
||||
// ServiceEntryNamespaceListerExpansion allows custom methods to be added to
|
||||
// ServiceEntryNamespaceLister.
|
||||
type ServiceEntryNamespaceListerExpansion interface{}
|
||||
|
||||
// SidecarListerExpansion allows custom methods to be added to
|
||||
// SidecarLister.
|
||||
type SidecarListerExpansion interface{}
|
||||
|
||||
// SidecarNamespaceListerExpansion allows custom methods to be added to
|
||||
// SidecarNamespaceLister.
|
||||
type SidecarNamespaceListerExpansion interface{}
|
||||
|
||||
// VirtualServiceListerExpansion allows custom methods to be added to
|
||||
// VirtualServiceLister.
|
||||
type VirtualServiceListerExpansion interface{}
|
||||
|
||||
// VirtualServiceNamespaceListerExpansion allows custom methods to be added to
|
||||
// VirtualServiceNamespaceLister.
|
||||
type VirtualServiceNamespaceListerExpansion interface{}
|
|
@ -1,94 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// GatewayLister helps list Gateways.
|
||||
type GatewayLister interface {
|
||||
// List lists all Gateways in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1alpha3.Gateway, err error)
|
||||
// Gateways returns an object that can list and get Gateways.
|
||||
Gateways(namespace string) GatewayNamespaceLister
|
||||
GatewayListerExpansion
|
||||
}
|
||||
|
||||
// gatewayLister implements the GatewayLister interface.
|
||||
type gatewayLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewGatewayLister returns a new GatewayLister.
|
||||
func NewGatewayLister(indexer cache.Indexer) GatewayLister {
|
||||
return &gatewayLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all Gateways in the indexer.
|
||||
func (s *gatewayLister) List(selector labels.Selector) (ret []*v1alpha3.Gateway, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha3.Gateway))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Gateways returns an object that can list and get Gateways.
|
||||
func (s *gatewayLister) Gateways(namespace string) GatewayNamespaceLister {
|
||||
return gatewayNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// GatewayNamespaceLister helps list and get Gateways.
|
||||
type GatewayNamespaceLister interface {
|
||||
// List lists all Gateways in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v1alpha3.Gateway, err error)
|
||||
// Get retrieves the Gateway from the indexer for a given namespace and name.
|
||||
Get(name string) (*v1alpha3.Gateway, error)
|
||||
GatewayNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// gatewayNamespaceLister implements the GatewayNamespaceLister
|
||||
// interface.
|
||||
type gatewayNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all Gateways in the indexer for a given namespace.
|
||||
func (s gatewayNamespaceLister) List(selector labels.Selector) (ret []*v1alpha3.Gateway, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha3.Gateway))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the Gateway from the indexer for a given namespace and name.
|
||||
func (s gatewayNamespaceLister) Get(name string) (*v1alpha3.Gateway, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha3.Resource("gateway"), name)
|
||||
}
|
||||
return obj.(*v1alpha3.Gateway), nil
|
||||
}
|
94
vendor/knative.dev/pkg/client/istio/listers/networking/v1alpha3/serviceentry.go
generated
vendored
94
vendor/knative.dev/pkg/client/istio/listers/networking/v1alpha3/serviceentry.go
generated
vendored
|
@ -1,94 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// ServiceEntryLister helps list ServiceEntries.
|
||||
type ServiceEntryLister interface {
|
||||
// List lists all ServiceEntries in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1alpha3.ServiceEntry, err error)
|
||||
// ServiceEntries returns an object that can list and get ServiceEntries.
|
||||
ServiceEntries(namespace string) ServiceEntryNamespaceLister
|
||||
ServiceEntryListerExpansion
|
||||
}
|
||||
|
||||
// serviceEntryLister implements the ServiceEntryLister interface.
|
||||
type serviceEntryLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewServiceEntryLister returns a new ServiceEntryLister.
|
||||
func NewServiceEntryLister(indexer cache.Indexer) ServiceEntryLister {
|
||||
return &serviceEntryLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all ServiceEntries in the indexer.
|
||||
func (s *serviceEntryLister) List(selector labels.Selector) (ret []*v1alpha3.ServiceEntry, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha3.ServiceEntry))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// ServiceEntries returns an object that can list and get ServiceEntries.
|
||||
func (s *serviceEntryLister) ServiceEntries(namespace string) ServiceEntryNamespaceLister {
|
||||
return serviceEntryNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// ServiceEntryNamespaceLister helps list and get ServiceEntries.
|
||||
type ServiceEntryNamespaceLister interface {
|
||||
// List lists all ServiceEntries in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v1alpha3.ServiceEntry, err error)
|
||||
// Get retrieves the ServiceEntry from the indexer for a given namespace and name.
|
||||
Get(name string) (*v1alpha3.ServiceEntry, error)
|
||||
ServiceEntryNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// serviceEntryNamespaceLister implements the ServiceEntryNamespaceLister
|
||||
// interface.
|
||||
type serviceEntryNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all ServiceEntries in the indexer for a given namespace.
|
||||
func (s serviceEntryNamespaceLister) List(selector labels.Selector) (ret []*v1alpha3.ServiceEntry, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha3.ServiceEntry))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the ServiceEntry from the indexer for a given namespace and name.
|
||||
func (s serviceEntryNamespaceLister) Get(name string) (*v1alpha3.ServiceEntry, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha3.Resource("serviceentry"), name)
|
||||
}
|
||||
return obj.(*v1alpha3.ServiceEntry), nil
|
||||
}
|
|
@ -1,94 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// SidecarLister helps list Sidecars.
|
||||
type SidecarLister interface {
|
||||
// List lists all Sidecars in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1alpha3.Sidecar, err error)
|
||||
// Sidecars returns an object that can list and get Sidecars.
|
||||
Sidecars(namespace string) SidecarNamespaceLister
|
||||
SidecarListerExpansion
|
||||
}
|
||||
|
||||
// sidecarLister implements the SidecarLister interface.
|
||||
type sidecarLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewSidecarLister returns a new SidecarLister.
|
||||
func NewSidecarLister(indexer cache.Indexer) SidecarLister {
|
||||
return &sidecarLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all Sidecars in the indexer.
|
||||
func (s *sidecarLister) List(selector labels.Selector) (ret []*v1alpha3.Sidecar, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha3.Sidecar))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Sidecars returns an object that can list and get Sidecars.
|
||||
func (s *sidecarLister) Sidecars(namespace string) SidecarNamespaceLister {
|
||||
return sidecarNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// SidecarNamespaceLister helps list and get Sidecars.
|
||||
type SidecarNamespaceLister interface {
|
||||
// List lists all Sidecars in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v1alpha3.Sidecar, err error)
|
||||
// Get retrieves the Sidecar from the indexer for a given namespace and name.
|
||||
Get(name string) (*v1alpha3.Sidecar, error)
|
||||
SidecarNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// sidecarNamespaceLister implements the SidecarNamespaceLister
|
||||
// interface.
|
||||
type sidecarNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all Sidecars in the indexer for a given namespace.
|
||||
func (s sidecarNamespaceLister) List(selector labels.Selector) (ret []*v1alpha3.Sidecar, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha3.Sidecar))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the Sidecar from the indexer for a given namespace and name.
|
||||
func (s sidecarNamespaceLister) Get(name string) (*v1alpha3.Sidecar, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha3.Resource("sidecar"), name)
|
||||
}
|
||||
return obj.(*v1alpha3.Sidecar), nil
|
||||
}
|
94
vendor/knative.dev/pkg/client/istio/listers/networking/v1alpha3/virtualservice.go
generated
vendored
94
vendor/knative.dev/pkg/client/istio/listers/networking/v1alpha3/virtualservice.go
generated
vendored
|
@ -1,94 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// VirtualServiceLister helps list VirtualServices.
|
||||
type VirtualServiceLister interface {
|
||||
// List lists all VirtualServices in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1alpha3.VirtualService, err error)
|
||||
// VirtualServices returns an object that can list and get VirtualServices.
|
||||
VirtualServices(namespace string) VirtualServiceNamespaceLister
|
||||
VirtualServiceListerExpansion
|
||||
}
|
||||
|
||||
// virtualServiceLister implements the VirtualServiceLister interface.
|
||||
type virtualServiceLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewVirtualServiceLister returns a new VirtualServiceLister.
|
||||
func NewVirtualServiceLister(indexer cache.Indexer) VirtualServiceLister {
|
||||
return &virtualServiceLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all VirtualServices in the indexer.
|
||||
func (s *virtualServiceLister) List(selector labels.Selector) (ret []*v1alpha3.VirtualService, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha3.VirtualService))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// VirtualServices returns an object that can list and get VirtualServices.
|
||||
func (s *virtualServiceLister) VirtualServices(namespace string) VirtualServiceNamespaceLister {
|
||||
return virtualServiceNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// VirtualServiceNamespaceLister helps list and get VirtualServices.
|
||||
type VirtualServiceNamespaceLister interface {
|
||||
// List lists all VirtualServices in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v1alpha3.VirtualService, err error)
|
||||
// Get retrieves the VirtualService from the indexer for a given namespace and name.
|
||||
Get(name string) (*v1alpha3.VirtualService, error)
|
||||
VirtualServiceNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// virtualServiceNamespaceLister implements the VirtualServiceNamespaceLister
|
||||
// interface.
|
||||
type virtualServiceNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all VirtualServices in the indexer for a given namespace.
|
||||
func (s virtualServiceNamespaceLister) List(selector labels.Selector) (ret []*v1alpha3.VirtualService, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha3.VirtualService))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the VirtualService from the indexer for a given namespace and name.
|
||||
func (s virtualServiceNamespaceLister) Get(name string) (*v1alpha3.VirtualService, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha3.Resource("virtualservice"), name)
|
||||
}
|
||||
return obj.(*v1alpha3.VirtualService), nil
|
||||
}
|
|
@ -35,18 +35,6 @@ ${REPO_ROOT_DIR}/hack/generate-knative.sh "injection" \
|
|||
"duck:v1alpha1,v1beta1,v1" \
|
||||
--go-header-file ${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt
|
||||
|
||||
# Generate our own client for istio (otherwise injection won't work)
|
||||
${CODEGEN_PKG}/generate-groups.sh "client,informer,lister" \
|
||||
knative.dev/pkg/client/istio istio.io/client-go/pkg/apis \
|
||||
"networking:v1alpha3" \
|
||||
--go-header-file ${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt
|
||||
|
||||
# Knative Injection (for istio)
|
||||
${REPO_ROOT_DIR}/hack/generate-knative.sh "injection" \
|
||||
knative.dev/pkg/client/istio istio.io/client-go/pkg/apis \
|
||||
"networking:v1alpha3" \
|
||||
--go-header-file ${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt
|
||||
|
||||
OUTPUT_PKG="knative.dev/pkg/client/injection/kube" \
|
||||
VERSIONED_CLIENTSET_PKG="k8s.io/client-go/kubernetes" \
|
||||
EXTERNAL_INFORMER_PKG="k8s.io/client-go/informers" \
|
||||
|
|
|
@ -22,7 +22,6 @@ import (
|
|||
"testing"
|
||||
|
||||
fakekubeclient "knative.dev/pkg/client/injection/kube/client/fake"
|
||||
fakeistioclient "knative.dev/pkg/client/istio/injection/client/fake"
|
||||
fakedynamicclient "knative.dev/pkg/injection/clients/dynamicclient/fake"
|
||||
|
||||
"knative.dev/pkg/configmap"
|
||||
|
@ -62,7 +61,6 @@ func MakeFactory(ctor Ctor) rtesting.Factory {
|
|||
ctx = logging.WithLogger(ctx, logger)
|
||||
|
||||
ctx, kubeClient := fakekubeclient.With(ctx, ls.GetKubeObjects()...)
|
||||
ctx, istioClient := fakeistioclient.With(ctx, ls.GetIstioObjects()...)
|
||||
ctx, dynamicClient := fakedynamicclient.With(ctx,
|
||||
ls.NewScheme(), ToUnstructured(t, ls.NewScheme(), r.Objects)...)
|
||||
|
||||
|
@ -95,11 +93,10 @@ func MakeFactory(ctor Ctor) rtesting.Factory {
|
|||
|
||||
for _, reactor := range r.WithReactors {
|
||||
kubeClient.PrependReactor("*", "*", reactor)
|
||||
istioClient.PrependReactor("*", "*", reactor)
|
||||
dynamicClient.PrependReactor("*", "*", reactor)
|
||||
}
|
||||
|
||||
actionRecorderList := rtesting.ActionRecorderList{istioClient, dynamicClient, kubeClient}
|
||||
actionRecorderList := rtesting.ActionRecorderList{dynamicClient, kubeClient}
|
||||
eventList := rtesting.EventList{Recorder: eventRecorder}
|
||||
|
||||
return c, actionRecorderList, eventList, statsReporter
|
||||
|
|
|
@ -17,7 +17,6 @@ limitations under the License.
|
|||
package testing
|
||||
|
||||
import (
|
||||
istiov1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
|
||||
admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1"
|
||||
appsv1 "k8s.io/api/apps/v1"
|
||||
autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1"
|
||||
|
@ -29,8 +28,6 @@ import (
|
|||
autoscalingv2beta1listers "k8s.io/client-go/listers/autoscaling/v2beta1"
|
||||
corev1listers "k8s.io/client-go/listers/core/v1"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
fakeistioclientset "knative.dev/pkg/client/istio/clientset/versioned/fake"
|
||||
istiolisters "knative.dev/pkg/client/istio/listers/networking/v1alpha3"
|
||||
"knative.dev/pkg/reconciler/testing"
|
||||
pkgtesting "knative.dev/pkg/testing"
|
||||
pkgducktesting "knative.dev/pkg/testing/duck"
|
||||
|
@ -38,7 +35,6 @@ import (
|
|||
|
||||
var clientSetSchemes = []func(*runtime.Scheme) error{
|
||||
fakekubeclientset.AddToScheme,
|
||||
fakeistioclientset.AddToScheme,
|
||||
autoscalingv2beta1.AddToScheme,
|
||||
pkgtesting.AddToScheme,
|
||||
pkgducktesting.AddToScheme,
|
||||
|
@ -87,11 +83,6 @@ func (l *Listers) GetKubeObjects() []runtime.Object {
|
|||
return l.sorter.ObjectsForSchemeFunc(fakekubeclientset.AddToScheme)
|
||||
}
|
||||
|
||||
// GetIstioObjects filters the Listers initial list of objects to types defined in knative/pkg
|
||||
func (l *Listers) GetIstioObjects() []runtime.Object {
|
||||
return l.sorter.ObjectsForSchemeFunc(fakeistioclientset.AddToScheme)
|
||||
}
|
||||
|
||||
// GetTestObjects filters the Lister's initial list of objects to types defined in knative/pkg/testing
|
||||
func (l *Listers) GetTestObjects() []runtime.Object {
|
||||
return l.sorter.ObjectsForSchemeFunc(pkgtesting.AddToScheme)
|
||||
|
@ -107,16 +98,6 @@ func (l *Listers) GetHorizontalPodAutoscalerLister() autoscalingv2beta1listers.H
|
|||
return autoscalingv2beta1listers.NewHorizontalPodAutoscalerLister(l.IndexerFor(&autoscalingv2beta1.HorizontalPodAutoscaler{}))
|
||||
}
|
||||
|
||||
// GetVirtualServiceLister gets lister for Istio VirtualService resource.
|
||||
func (l *Listers) GetVirtualServiceLister() istiolisters.VirtualServiceLister {
|
||||
return istiolisters.NewVirtualServiceLister(l.IndexerFor(&istiov1alpha3.VirtualService{}))
|
||||
}
|
||||
|
||||
// GetGatewayLister gets lister for Istio Gateway resource.
|
||||
func (l *Listers) GetGatewayLister() istiolisters.GatewayLister {
|
||||
return istiolisters.NewGatewayLister(l.IndexerFor(&istiov1alpha3.Gateway{}))
|
||||
}
|
||||
|
||||
// GetDeploymentLister gets lister for K8s Deployment resource.
|
||||
func (l *Listers) GetDeploymentLister() appsv1listers.DeploymentLister {
|
||||
return appsv1listers.NewDeploymentLister(l.IndexerFor(&appsv1.Deployment{}))
|
||||
|
|
Loading…
Reference in New Issue